2017-06-04 19:36:53 +00:00
|
|
|
# say
|
|
|
|
# Converts text to speech.
|
2017-06-04 14:35:24 +00:00
|
|
|
|
2020-10-20 22:52:56 +00:00
|
|
|
# Say a phrase aloud.
|
2017-06-04 19:36:53 +00:00
|
|
|
say "I like to ride my bike."
|
2017-06-04 14:35:24 +00:00
|
|
|
|
2020-10-20 22:52:56 +00:00
|
|
|
# Read a file aloud.
|
2017-06-04 19:36:53 +00:00
|
|
|
say -f filename.txt
|
2017-06-04 14:35:24 +00:00
|
|
|
|
2020-10-20 22:52:56 +00:00
|
|
|
# Say a phrase with a custom voice and speech rate.
|
2017-06-04 19:36:53 +00:00
|
|
|
say -v voice -r words_per_minute "I'm sorry Dave, I can't let you do that."
|
2017-06-04 14:35:24 +00:00
|
|
|
|
2020-10-20 22:52:56 +00:00
|
|
|
# List the available voices.
|
2020-10-26 06:58:42 +00:00
|
|
|
say -v '?'
|
2017-06-04 14:35:24 +00:00
|
|
|
|
2020-10-20 22:52:56 +00:00
|
|
|
# Hear the available voices.
|
2020-10-26 06:58:42 +00:00
|
|
|
say -v \? | awk '{ print $1 }' | while read v; do echo "$v is speaking..."; say -v $v "Hi, my name is $v"; done
|
2018-07-20 15:19:28 +00:00
|
|
|
|
2020-10-20 22:52:56 +00:00
|
|
|
# Create an audio file of the spoken text.
|
2017-06-04 19:36:53 +00:00
|
|
|
say -o filename.aiff "Here's to the Crazy Ones."
|