2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-17 09:25:32 +00:00
cheat.sheets/sheets/say

24 lines
533 B
Plaintext
Raw Normal View History

2017-06-04 19:36:53 +00:00
# say
#
# Converts text to speech.
2017-06-04 14:35:24 +00:00
2017-06-04 19:36:53 +00:00
# Say a phrase aloud:
say "I like to ride my bike."
2017-06-04 14:35:24 +00:00
2017-06-04 19:36:53 +00:00
# Read a file aloud:
say -f filename.txt
2017-06-04 14:35:24 +00:00
2017-06-04 19:36:53 +00:00
# Say a phrase with a custom voice and speech rate:
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
2017-06-04 19:36:53 +00:00
# List the available voices:
say -v ?
2017-06-04 14:35:24 +00:00
2018-07-20 15:19:28 +00:00
# Hear the available voices
say -v ? | awk '{ print $1 }' | while read v; do echo "$v is speaking..."; say -v $v "Hi, my name is $v"; done
2017-06-04 19:36:53 +00:00
# Create an audio file of the spoken text:
say -o filename.aiff "Here's to the Crazy Ones."
2017-06-04 14:35:24 +00:00