Created
October 11, 2019 14:48
-
-
Save skratchdot/c51634a97653928d21078986ffbb5cf4 to your computer and use it in GitHub Desktop.
some helper functions for the OSX say command (random words, random voices, etc)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## say with a random voice | |
say_rand () { | |
say -v $(say -v ? | awk '{print $1}' | shuf -n1) "$@" | |
} | |
## say with a random english voice | |
say_rand_en () { | |
say -v $(say -v ? | grep en_ | awk '{print $1}' | shuf -n1) "$@" | |
} | |
## random english word | |
say_word () { | |
shuf -n1 /usr/share/dict/words | say | |
} | |
## random english word with random english voice | |
say_word2 () { | |
shuf -n1 /usr/share/dict/words | say -v $(say -v ? | grep en_ | awk '{print $1}' | shuf -n1) | |
} | |
## random weird noise | |
say_noise () { | |
LC_CTYPE=C tr -dc 'a-z ' < /dev/urandom | head -c5 | say -v $(say -v ? | awk '{print $1}' | shuf -n1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment