Filed under: Features, How-tos
Mac Automation: Make your text speak its mind

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


![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
soup4you2 said 9:09AM on 4-13-2009
Or you could open up the terminal and type in:
# say "Your text to speak here"
Reply
k3rnel said 10:13AM on 4-13-2009
LOL I was just gonna post this same thing, ya beat me to it!
nealobus said 10:38AM on 4-13-2009
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!
Reply
James Madley said 10:47AM on 4-13-2009
say -o foo.aiff "Hello World"
Replace "foo" and "Hello World" accordingly.
Gp said 12:35PM on 4-13-2009
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?
Reply
Greg Cavallaro said 2:10PM on 4-13-2009
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!
Reply
Jim Barr said 6:14PM on 4-13-2009
I agree. How do you get the input box to show up? Something must be missing.
TonyL said 7:09PM on 4-13-2009
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.
Reply
borgl said 10:50AM on 4-14-2009
Erica Sadun was much better? That's really saying something.
gtdavemac said 5:10AM on 4-17-2009
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.
Reply
MoonCaine said 6:08PM on 4-17-2009
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.
Reply
Ken Wilcox said 9:49PM on 4-18-2009
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.
james_a_hood said 10:43AM on 4-18-2009
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".
Reply
Greg Cavallaro said 7:16PM on 4-18-2009
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?
james_a_hood said 5:43PM on 4-19-2009
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.
sonic the plumber said 5:47PM on 4-26-2009
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.
Reply