Tuesday, December 16, 2008

Say say say

The say command tells your Mac to talk back, reciting either a string of text or reading an entire file.

To have the computer read a string of text

Open a Terminal and type:
say "This is a string of text."

To have the computer read text from a file

Open a Terminal and type:
say -f /path/to/text/file

Using a different voice

The speech synthesis system comes with several voices. You can see all the voices available in System Preferences / Speech. The default voice selected in System Preferences is used unless a different one is specified with the -v switch. For example, to use the "Kathy" voice:

say -v Kathy "This is a string of text."