Thursday, January 12, 2012

Recording OS X Text to Speech to an Audio file using Terminal

This is a very useful method to record OS X text to speech into an audio file.

  1. Create a text file using TextEdit and write whatever you want the Mac to speak then save it as "text.txt" on your desktop.

  2. Open Terminal

  3. Type cd ~/desktop and click Enter

  4. Type say -v Alex -o "audio.aiff" -f "text.txt" being "audio.aiff" is the name of the audio output file and "text.txt" is the name of your text file saved on your desktop then click Enter


Once you click Enter the audio file will appear on your desktop.

You can change the voice with any of OS X system voices (Kathy, Vicky, Victoria, Alex, Bruce, Fred) by replacing Alex with any of the names.

Note that even ".rtf" files can be read as well so in that case just change "text.txt" with "text.rtf".

1 comment:

Anonymous said...

Thank you so much. This post has been of great help. As usual the solution is simple.