Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
script for language learners to record and listen their own voice while studying
#!/bin/bash
# apt-get install sox
unset ans
tmp=$(mktemp).wav
while true; do
echo -n "Enter to start recording (Ctrl+C to finish), p to play again, q to quit... "
read ans
case "$ans" in
p) play $tmp;;
q) break;;
*) rec $tmp; play $tmp;;
esac
done
rm $tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment