Skip to content

Instantly share code, notes, and snippets.

@pikesley
Last active August 29, 2015 14:02
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 pikesley/b3bc54aa4c262df4ddb9 to your computer and use it in GitHub Desktop.
Save pikesley/b3bc54aa4c262df4ddb9 to your computer and use it in GitHub Desktop.
Say All The Words
#!/bin/bash
say -v ? | sed "s: :%:" | sed "s:\(.*\)%.*:\1:" > /tmp/voices
IFS=$'\r\n' VOICES=($(cat /tmp/voices))
rm /tmp/voices
for WORD in `cat /usr/share/dict/words`
do
VOICE=${VOICES[$RANDOM % ${#VOICES[@]}]}
echo ${VOICE} says ${WORD}
say -v "${VOICE}" ${WORD}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment