Back to Mobile View

Skip to Content

TUAW Deals

Terminal Tips: Say

terminal say
Have you ever wanted to have your Mac convert a document / news story into an audio file so that you can listen to it on your iPod, but didn't want to spend the money on a high cost program to do it?  Well, it just so happens that OS X has a very powerful text to speech engine that is easily accessible via the command line.  Simply launch the Terminal (located in /Applications/Utilities/) and type say -f pathtotextfile -o ~/Desktop/convertedfile.aiff, substituting the path to the text file you want to convert for pathtotextfile and the name you want for the resulting audio file for convertedfile, and hit return.

Your Mac will read the file into an AIFF audio file on your Desktop using the Default Voice and reading-speed settings you have set up in your Speech control panel in the System Preferences. It may take a while to write the file, as it reads in real time.  Once it is done you will be returned to the shell prompt.

Now just drag the file into iTunes and convert to MP3 / AAC file and delete the original file to save some space.  Easy!

If you'd rather just have your Mac read a file out loud to you, then leave off the part from the -o command forward.
 

© 2014 AOL Inc. All Rights Reserved.