by David Sparks

 

RSS Sponsor:

Search
« Japan Relief through iTunes | Main | Ping Pong and Secure Dropbox Delivery »
9:00AM

Service Sunday - Text to iTunes Audio

One of my very favorite web services is Instapaper. It allows you to clip any webpage for later reading. The trouble is, Instapaper makes it so easy to mark articles for later reading that I tend to mark many more articles than I can possibly find time to read. In effort to keep up with the deluge, I decided to start converting some of the articles to audio tracks.

Before digging in, let’s talk about what this service will do. You can highlight any selection of text, including an Instapaper article, and right click into a service that will grab the text, convert it to an audio file, rename it, and dump it into an iTunes playlist. This is remarkably easy. You just need Snow Leopard 10.6, a little patience, and about 15 minutes. So load up Automator and let’s get started.

The Automator Script

If you’ve never used Automator before, you’re going to love it. Automator lets you program your Mac without knowing how to program.

When you first load up Automator, you will be prompted to choose your workflow. For this project, choose to make a Service. This lets you to activate it contextually (right clicky). So click on Service and move along.

This service will accept text from any application. I normally use it in Safari, but it will work with Pages documents, long e-mails, RSS readers, and any other place that you have lots of text.

So Automator is kind of like programming tinker toys. You get one piece and connect it to the next. The first piece, called “Text to Audio,” converts accepts text and spits out an AIFF file. The easiest way to find it is typing “text to audio” in the search window.

Drag the action over and your screen should look like this.

This first step is the most important. It grabs text and converts it into an audio file. I save the audio file to the desktop with a temporary name “T2A”. The workflow will trash the file later.

Next, the workflow renames it with the “Rename Finder Items” action. By enabling the “Show this action when the workflow runs” option, you can type in a name when the service runs.

Next, the service imports the file to iTunes with the “Import Audio Files” action. Ticking the box, “Delete source files after encoding” cleans up your desktop for you.

Finally, the service adds the audio file to an existing playlist. I created one called, “Fascinating Text.” Here is the whole workflow.

For bonus points, set up a Smart playlist in iTunes that grabs all unplayed files from the Fascinating Text playlist and sync it to your iPhone/iPad/iPod and you are set. Wherever you go, great listening materials are a click away.

In Action

Just highlight some text and activate the service. I usually do it from the Readability view in Safari. For long articles, this can take several minutes.

Then give it a name.

Then Automator does the rest. If its a large file, this also can take awhile. Open iTunes and play.

The articles I most often convert to audio are non-techy long form pieces. So often, reading Mac and Legal stuff results in new OmniFocus tasks for me so I prefer to put in text like New Yorker or New Republic articles. Literature would work but the voice isn’t natural enough. I tried “To Kill a Mockingbird,” but listening to Alex recite Atticus Finch made me want to push an icepick in my ear.

Reader Comments (10)

Unbelievable! How do you think of these things? The only thing that is more unbelievable is that I was able to make the smart playlist you suggested…and it worked too.

Nice job, thanks.

March 13, 2011 | Unregistered CommenterRon

Excellent! I too, can't read everything I'd like. Being a recent switcher, I've never used Automator before. Worked liked charm. Thanks.

March 13, 2011 | Unregistered CommenterRichard Heldmann

Thank you thank you thank you for this workflow. Extremely useful. I always forget about Automator.

I have used a similar technique for a while now. I tend to send articles to Instapaper frequently on my mobile, and in long commutes, I would either read them or send the article to my computer to convert to audio then send it back to me. I did this through AppleScript. If anyone is interested, let me know and I will post it here.

March 13, 2011 | Unregistered CommenterKha

This is awesome! I had made a text-to-speech automator workflow before for proofreading purposes, but didn't think to link it to iTunes for "voice Instapaper". Fantastic.

March 14, 2011 | Unregistered CommenterBrooks Duncan

One minor change that I did to this was add the step "Set Options of iTunes Songs" and then set Remember Playback Position and Skip When Shuffling to Yes.

Here's a screenshot: http://cl.ly/0E1D3l362x221f3O3e3G.

Helpful if you have to stop listening to an article partway through.

March 14, 2011 | Unregistered CommenterBrooks Duncan

If you find that Alex reads too slow by default, you can add a Run AppleScript to the top of the service (i.e., before the Text to Audio File) and type this code:

on run {input, parameters}

set input to "[[rate 350]] " & input
return input
end run

Change the 350 to whatever value you like in theory values should be around 160 and 210, but I’m used to listening to the electronic speech fast. 350 is likely too fast if you’ve never tried it before.

March 16, 2011 | Unregistered CommenterNorwegian Rock Cat

Thank you for the automator tutorial, very helpful!

March 31, 2011 | Unregistered CommenterSuzy

This is now built into Lion. Select some text, right click, and select "Add to iTunes as a Spoken Track" from the Services menu.

July 31, 2011 | Unregistered CommenterSean

@Sean

I didn't notice that. Thanks.

August 4, 2011 | Registered CommenterDavid Sparks

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>