Name
say
Synopsis
say [-vvoice
] [-oout
.aiff] [-ffile
|string
... ]
Uses Mac OS X’s Speech Synthesis manager
to speak the file
or string
using the default voice set in the Speech preference panel (System Preferences → Speech → Text to Speech → System Voice).
Options
-
string
Text to be spoken using the default system voice; for example:
$
say "I love Mac OS X"
Notice how the system pronounces the “X” of “Mac OS X” as “ten.”
-
-f
file
Specify a
file
to be read as input and spoken using the default system voice; for example:$
say -f
filename
.txt
-
-v
voice
Use the specified voice instead of the default system voice; for example
$
say -v Fred "I love Mac OS X"
This uses the Fred
voice
to speak thestring
, “I love Mac OS X.” The list of voices can be found in the Speech → Default Voices preference panel.-
-o
out
.aiff Output the spoken text as an AIFF sound file; for example,
$
say -o ~/Desktop/iheartmosx.aiff -v Fred "I love Mac OS X"
This command uses the
voice
Fred to speak thestring
“I love Mac OS X,” and save it as a sound file named iheartmosx.aiff on the Desktop. When outputting a sound file, the -o option must immediately follow the say command.
Get Mac OS X Tiger in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.