Skip to content

Instantly share code, notes, and snippets.

@codito
Created October 3, 2012 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codito/3828024 to your computer and use it in GitHub Desktop.
Save codito/3828024 to your computer and use it in GitHub Desktop.
GRE Word Call
#!/bin/bash
# Script to speak out GRE words, turn it on and sleep ;)
# Get wordlist from http://pastebin.com/JLQs9MT2
#espeakcmd="espeak -g 1 -s 170 -a 150 -p 10 -v english-us"
espeakcmd="festival --tts"
shuf GREwordlist.txt | while read line
do
word=`echo $line | cut -f 1 -d " " -`
meaning=`echo $line | cut -f 2- -d " " -`
echo "word = $word" | `$espeakcmd`
cnt=${#word}
ww=""
for ((i=0; i < cnt; i++))
do
ww="$ww${word:$i:1}"" "
#echo ${word:$i:1} | `$espeakcmd`
done
echo $ww | `$espeakcmd`
sleep 1
echo "= "$ww | `$espeakcmd`
sleep 1
echo "meaning = $meaning" | `$espeakcmd`
sleep 3
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment