Mac Automation: listen to a text document
Don't have time to read that Word, Pages, or TextEdit document at your desk? Why not listen to it on your iPod instead? In this Automator how-to, I am going to show you how to create an audio file using text that you have in an open document, then sync that using iTunes to your iPod or iPhone. Creating the workflow
For this workflow, you need the following Automator actions (placed in the same order):
- Get Contents of TextEdit Document
- Text to Audio File
- Import Files into iTunes
Continue reading to learn how to build this workflow.

Saving the workflow
You can breathe a little because you're half way done. Now, let's save the workflow as an application so it can be re-used at your whim. To save:
- Click File > Save
- Choose "Application" from the Format drop-down box
- Choose a location and file name, then click Save
Running the workflow
To run the workflow, just open TextEdit (this application comes with Mac OS X and can be found in your Applications directory). Type a document in TextEdit, or copy and paste any text you want. When you are ready to convert your TextEdit document into an audio file, just double click on your workflow that you saved in the last step.
The text will then be copied from the document and a dialog will ask you where you want to save the audio file that it will create. You can also specify a system voice to be used. If you are using Mac OS X Leopard, Alex is by-far the best voice for this job.


You can then sync your playlist to the iPod or iPhone of your choice. You will then be listening to your text in no time! You can also combine this with last weeks Mac Automation post to create audio version of websites!
Remember -- if you have a special automation request, feel free to leave a comment or use our contact form.
Share
Don't have time to read that Word, Pages, or TextEdit document at your desk? Why not listen to it on your iPod instead? In this Automator...
Add a Comment
As a terminal junkie my advise is this.
Save you text file to the desktop. Please be sure is plain text file.
Open the terminal
Type
say -f [yourtextfile.txt] -o [myoutputfile.aiff]
eventually if you have an mp3 encoder installed you can directly stream the aiff to mp3 with the |
cheers
Why not add Doug Adams 'Make Bookmarkable' script, this would get text based files out of the music library and into Audiobooks.
March 18 2008 at 4:24 AM Report abuse Permalink rate up rate down ReplyWorks great! I am just wondering if there is a way to pass parameters to the Text to Audio File action, such as speed.
Alex
Getting same error as Jay:
"Canât get «class popB» "voice popup" of missing value. (-1728)"
Any suggestions please?
Update - I hope Cory doesn't mind but because this is such an great tool to have available, I have been mucking about with this workflow for a bit and found a slight variation that Meatleg might find useful since it can automatically convert to your chosen compressed format.
The workflow for this goes:
1. Get Contents of TextEdit Document (as before)
2. Text to Audio File (as before)
3. Import Audio Files (with 'delete source files after encoding' selected and 'show this action when the workflow runs' either selected or not - depending on whether you want to change the file type on the fly).
4. Add songs to playlist -- New Playlist -- (type the name of your new playlist in here).
This is a bit neater for me, because it doesn't leave the source file on the desktop and it doesn't leave the AIFF file stuck in the iTunes library.
I think this is better. Is there a way to set up a keystroke to this?
February 28 2008 at 11:21 PM Report abuse Permalink rate up rate down ReplyI got the same errors, but I found that if you save the Automator workflow as a Script Menu item it works brilliantly and is just as accessible (assuming you have the Icon in your menu bar). You could probably save it as a Finder plug-in as well.
Thanks for the great tip Cory.
Great how-to! The only problem is that the French release of Mac OS X only speaks English, not French. And French text are read with very funny accent :)
February 28 2008 at 4:45 PM Report abuse Permalink rate up rate down ReplyI was getting the same errors too. I tried it in Automator and it works but not as a stand alone app. Very cool though!
February 28 2008 at 1:50 PM Report abuse Permalink rate up rate down ReplyYou're making this too hard.
Under SYSTEM PREFERENCES>SPEECH, you can check the speak selected text box, and set the key. Then, anything you select in any application, by pressing a key, will be spoken back.
I have used this for years to edit/proof documents I write. Now with 10.5 and the new ALEX voice, it is getting much more human sounding.
True, but it doesn't save to a audio file that you can listen to on your iPhone, iPod, or just through your Mac.
February 28 2008 at 11:03 PM Report abuse Permalink rate up rate down ReplyFor those that have developer tools installed, there's an app called "Speech Synthesis Example" that you can use to record text directly to an audio file. Not as cool as automator, but if you have problems, it's an option! :)
http://www.keynoteuser.com/news/?p=259
Deals of the Day
more deals- Used Apple iPad 64GB WiFi + 3G for $240 + free shipping
- AviiQ Portable USB Charging Station with cable rack for $54 + $8 s&h
- Dual USB Car Charger Adapter for $2 + free shipping
- Skullcandy 50/50 Earbuds for $25 + free shipping
- Monster Beats by Dr. Dre iBeats Earbuds for $39 + free shipping
- USB Data Charger Cable for iPhone / iPod 3-Pack for $2 + free shipping
19 Comments