Saving output from ‘text to speech’ to a file on Mac OS X

In terminal you can write something like:

say 'hello world'

Which will make your computer talk. To save the audio output to a file, use the -o option. A full example is:

say -o hello.aiff -v 'Alex' 'Hello, my name is Alex'
open hello.aiff

This will say 'Hello, my name is Alex', in the voice of 'Alex' (other voice-options are 'Bruce', 'Fred, 'Kathy', 'Vicki' and 'Victoria'), and save the output to 'hello.aiff'.

It seems there is no option for setting the speed (can be set in System preferences -> speech). See man say for all options. Interesting options include sending the output over the network.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.