Skip to Content

Mac Automation: Make your text speak its mind


Have you ever wanted to type something into your Mac and have it record what you typed audibly using any one of the Mac OS X voices? It's easily done with a few Automator actions, and in this Mac Automation post, I'll show you how.

Open Automator and find the following actions, then drag them to the workflow area (in the same order):
  • Get Specified Text
  • Text to Audio File

Running the workflow
With these two actions in place, you can enter text into the Get Specified Text action, and a file name in the Text to Audio File action, and run it with great results. The text that you enter will be magically encoded into audio using the specified voice in the audio file action.

Read on to learn more about saving the workflow, and adding additional options. Saving the workflow
You can extend this workflow by saving it as an application, and have it available to use without ever launching Automator. Before you start saving as an app, however, you must check the options for the actions. Click options on the Text to Audio File action and check the box that says "Show this action when the workflow runs." This option will allow you to change settings for this action when it opens as an app.

When you save the workflow as an application, it will appear just like an application file (.app) and will allow you to run the workflow by double-clicking (just like a real application) on the icon. You can save a workflow like this by clicking File > Save, and selecting "application" from the Format drop-down menu.

Adding options
If you wanted to add the audio file to iTunes, then you could optionally add the "Import Files into iTunes" action, which would, as the title says, import it into iTunes. You could also add the "Add Songs to iPod" action, which would place the audio file on any connected iPod.


Categories

Features How-tos

Have you ever wanted to type something into your Mac and have it record what you typed audibly using any one of the Mac OS X voices? It's...
 

Add a Comment

*0 / 3000 Character Maximum

16 Comments

Filter by:
sonic the plumber

My only experience of using the text-to-speech function for music was when I messed around in Garageband and put some cheesy lyrics through it and recorded it really cheaply through a microphone off of my iMac's JBL speaker system and into my iBook G4. This is much, much more simple for making more tracks with 'vocals'. Thanks.

April 26 2009 at 5:47 PM Report abuse rate up rate down Reply
james_a_hood

I was able to modify the example here a bit for some extended functionality. I used the "Ask for Text" action followed by the "Filter Paragraph" action set to return paragraphs that "are not empty". This output is then sent to the "Text to Audio File" action. I chose to not have the "Text to Audio File" options appear when the process is run, so I hard-coded a filename to be saved.

The result is that when the process runs I am prompted for text. I can paste in multiple paragraphs of text and the contents are then written to the audio file.

This may come in handy for folks wanting to listen to a long blog or web article "offline".

April 18 2009 at 10:42 AM Report abuse rate up rate down Reply
2 replies to james_a_hood's comment
Greg Cavallaro

You're awesome! I had been trying to find a way to get this to work; you sorted that out nicely.

Automator is such a powerful program, I should learn more about it.

I can't figure out what the return paragraph function is for. Is that so you don't create audio files that are blank?

April 18 2009 at 6:30 PM Report abuse rate up rate down Reply
james_a_hood

I found that without filtering the audio would only be generated for the first paragraph. Filtering breaks a single input containing many paragraphs into multiple inputs.

The down side I didn't realize when I posted is that multiple audio files are generated, but merging them or just ordering them wouldn't be that big of a deal.

April 19 2009 at 10:49 AM Report abuse rate up rate down Reply
moongrouch

It's a reasonable question.

Because there are situations, plenty of them, where highlighting text, then finding and clicking 3 menu items, with the mouse, is either impossible or inconvenient.

April 17 2009 at 6:08 PM Report abuse rate up rate down Reply
1 reply to moongrouch's comment
Ken Wilcox

Go to System Preferences
Speech
Text To Speech

Check the option "Speak selected text when the key is pressed" and assign a key. I use Command-Ctrl-S since dictionary is Command-Ctrl-D. I can look up a word an hear how it sounds with little effort.

April 18 2009 at 9:48 PM Report abuse rate up rate down Reply
gtdavemac

Why not highlight some text, the use the menu item "Services...Speech...Start Speaking Text"??

It's one thing as an example to show how Automator works (as some pointed out, I've not been able to get it to successfully complete any complex task) but this article makes it seem as though you have to use Automator to do something otherwise simple.

April 17 2009 at 4:28 AM Report abuse rate up rate down Reply
TonyL

What I get from posts like this from TUAWs current journalists is TUAW and the journalists trying to be something they are not.

Erica Sadun was much better.

April 13 2009 at 7:08 PM Report abuse rate up rate down Reply
1 reply to TonyL's comment
bangler

Erica Sadun was much better? That's really saying something.

April 14 2009 at 10:46 AM Report abuse rate up rate down Reply
Greg Cavallaro

This is new for me.

When I click the Text to Audio.app it only asks for a filename. Shouldn't it also ask for input text and have a field to write in or paste something?

When I go to click options in the "Get Specified Text" window it doesn't work because it's grayed out.

Help!

April 13 2009 at 2:09 PM Report abuse rate up rate down Reply
1 reply to Greg Cavallaro's comment
Jim Barr

I agree. How do you get the input box to show up? Something must be missing.

April 13 2009 at 6:14 PM Report abuse rate up rate down Reply
Gp

Are all the Automator examples totally bunk? This isn't a slight at you Cory, but it seems like all the Automator examples, including those from Apple, are very weak.

Can you post an example of using Automator with FM Pro to generate reports, and email them using a cron job set to once a month or some other timer?

April 13 2009 at 12:00 PM Report abuse rate up rate down Reply
nealobus

Not really a Terminal user, but I don't think your above solutions record the output to a file. Am I wrong?

What I am is an audio developer and having an export of those sound files is great to have in my arsenal of building sound bytes and promos.

Thanks for the tip, Cory!

April 13 2009 at 10:38 AM Report abuse rate up rate down Reply
1 reply to nealobus's comment
James Madley

say -o foo.aiff "Hello World"

Replace "foo" and "Hello World" accordingly.

April 13 2009 at 10:46 AM Report abuse rate up rate down Reply
soup4you2

Or you could open up the terminal and type in:
# say "Your text to speak here"

April 13 2009 at 9:08 AM Report abuse rate up rate down Reply
1 reply to soup4you2's comment
digilink

LOL I was just gonna post this same thing, ya beat me to it!

April 13 2009 at 10:13 AM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.