Skip to Content

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.

Now let's tweak some of the settings in these Automator actions. For both the "Text to Audio File" and "Import Files into iTunes," select the options button and check "Show this action when the workflow runs." This will allow you to change the files and playlist when you save and import to iTunes. In the Import Files into iTunes action, select "New playlist" from the drop-down box; you can specify a new name here or when you run the 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:
  1. Click File > Save
  2. Choose "Application" from the Format drop-down box
  3. Choose a location and file name, then click Save
Your workflow has now been saved as an application to the location that you specified.


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.


Once your audio file is saved, the workflow will ask you for the playlist name in iTunes to add it to. If you already have a playlist created, you can add the audio there; or if you want to create a new playlist, select "New playlist" from the drop-down box. When you click continue, your audio file will be added to iTunes to the playlist your specify.


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.


Categories

Features How-tos

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

*0 / 3000 Character Maximum Comment Moderation Enabled. Your comment will appear after it is cleared by an editor.

19 Comments

Filter by:
francesco

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

May 18 2008 at 1:06 PM Report abuse rate up rate down Reply
Mike C

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 rate up rate down Reply
Alessandro Vernet

Works great! I am just wondering if there is a way to pass parameters to the Text to Audio File action, such as speed.

Alex

February 29 2008 at 4:56 PM Report abuse rate up rate down Reply
Jutzuro

Getting same error as Jay:

"Can’t get «class popB» "voice popup" of missing value. (-1728)"

Any suggestions please?

February 29 2008 at 3:50 AM Report abuse rate up rate down Reply
Sam

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.


February 28 2008 at 7:13 PM Report abuse rate up rate down Reply
1 reply to Sam's comment
jay

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 rate up rate down Reply
Sam

I 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.

February 28 2008 at 6:35 PM Report abuse rate up rate down Reply
rei_vilo

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 rate up rate down Reply
Tom Bechtel

I 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 rate up rate down Reply
Kirk Rheinlander

You'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.

February 28 2008 at 1:11 PM Report abuse rate up rate down Reply
1 reply to Kirk Rheinlander's comment
jay

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 rate up rate down Reply
KeynoteKen

For 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

February 28 2008 at 12:04 PM Report abuse rate up rate down Reply
Buy an ad here

Tweets

© 2012 AOL Inc. All Rights Reserved.