Skip to content

Instantly share code, notes, and snippets.

@AndrewRayCode
Created February 15, 2015 20:35
Show Gist options
  • Save AndrewRayCode/20a8661ed2300d4fbc08 to your computer and use it in GitHub Desktop.
Save AndrewRayCode/20a8661ed2300d4fbc08 to your computer and use it in GitHub Desktop.
COLOR_LIGHT_RED=$(tput sgr0 && tput bold && tput setaf 1)
COLOR_LIGHT_CYAN=$(tput sgr0 && tput bold && tput setaf 6)
COLOR_RESET=$(tput sgr0)
say -v ? | while read line; do
voice=`echo $line | awk '{ print $1 }'`
phrase=`echo $line | sed -E 's/^.+# //'`
echo "${COLOR_LIGHT_RED}say -v ${COLOR_LIGHT_CYAN}${voice}${COLOR_RESET} $phrase"
say -v $voice $phrase
done
@AndrewRayCode
Copy link
Author

Put this in osx_say.sh then

chmod +x osx_say.sh
./osx_say.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment