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

Share
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
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 Permalink rate up rate down ReplyI 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".
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?
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.
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.
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.
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.
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.
Erica Sadun was much better? That's really saying something.
April 14 2009 at 10:46 AM Report abuse Permalink rate up rate down ReplyThis 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!
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 Permalink rate up rate down ReplyAre 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?
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!
say -o foo.aiff "Hello World"
Replace "foo" and "Hello World" accordingly.
Or you could open up the terminal and type in:
# say "Your text to speak here"
LOL I was just gonna post this same thing, ya beat me to it!
April 13 2009 at 10:13 AM Report abuse Permalink rate up rate down ReplyHot Apps on TUAW
Deals of the Day
more deals- Used Apple iMac 17" Core 2 Duo 1.83GHz for $430 + $28 s&h
- Lounge Deluxe Stand for iPhone / iPod touch for $28 + $8 s&h
- Brookstone Surround-Sound Earbuds for $14 + $7 s&h
- Refurbished Skullcandy Tokidoki Smokin' Buds Mic'd Headset for $5 + $2 s&h
- Stitchway Backup Battery for iPod / iPhone for $5 + free shipping
- Used Apple MacBook Pro 2.4GHz 15" LED Laptop for $1,030 + $29 s&h
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



16 Comments