Skip to content

Instantly share code, notes, and snippets.

@qzio
Last active September 28, 2016 14:28
Show Gist options
  • Save qzio/7b5e1c9158ea89d715a7a8013cf3382d to your computer and use it in GitHub Desktop.
Save qzio/7b5e1c9158ea89d715a7a8013cf3382d to your computer and use it in GitHub Desktop.
Script to loop through all the voices for the osx/macos `say` command, and make them say their "sample-string", as well as their name.
#!/bin/sh
for v in $( say -v '?' | awk '{print $1}') ; do
echo "voice $v"
mystring="$(say -v '?' | grep "$v" | awk '{$1=$2=$3="";print}')"
say -v "$v" "Hello, my name is ${v}. $mystring"
sleep 0.5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment