Skip to content

Instantly share code, notes, and snippets.

@hectorddmx
Created February 5, 2019 23:53
Show Gist options
  • Save hectorddmx/53b6f1e7fd2fab7d84db29bd3c8e0157 to your computer and use it in GitHub Desktop.
Save hectorddmx/53b6f1e7fd2fab7d84db29bd3c8e0157 to your computer and use it in GitHub Desktop.
Listar las voces de macOS
say -v \? | while read LINE
do
SPEAKER=$(echo $LINE | egrep -o "^[a-zA-Z\-]*[ ]?[A-Z][a-z]+")
TEXT=$(echo $LINE | egrep -o "#.*" | tr "#" " ")
echo $SPEAKER
echo -ne "This is voice $SPEAKER speaking the example text: \n" $TEXT | say -v $SPEAKER
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment