Saturday, October 24, 2009

Convert any text to your own mp3 automatically!

I heard Andy Ihnatko on MacBreak Weekly saying you could convert any text to an audio clip using an automator action in the services menu. This is handy for any time you want to hear something read back to you but listen on your iPod (in the car, for example). Andy was right - this is an awesome feature of Snow Leopard. Here's how to do it.



Launch Automator or if in Automator, File | New
  • Choose "Service" type of workflow
  • Make sure the service receives "text" in "any application"
  • Search for "audio" in the Variables pane
  • Choose "Text to Audio File" and drag to workflow workspace (right-hand pane)
  • Choose a voice (default is Alex)
  • Choose a file name: TextRecording
  • Choose a location (default is desktop)
  • Search for "audio" in the Variables pane
  • Drag "Import Audio Files" under the "Text to Audio File" workflow action
  • To save space, check "Delete source files after encoding".
  • Click Save, call the service "Text to mp3"
The service will now be available. To test, go to mail, highlight some text and choose from the menu: "Mail | Services | Text to mp3". The automator action will take the text, convert it to speech and convert that to an mp3 file in iTunes. The file can then be played straight away or synced to your iPod or media player.

If you want to run the automator action, search for "Get Specified Text" from the Actions pane and drag "Get Specified Text" above the "Text to Audio File" action. This will let you type text and run the workflow in Automator. You will have to remove the "Get Specified Text" action to save the workflow as a service.

Thanks Andy and thanks Apple for this amazing, easy feature.

(And if you were wondering where this magically puts the services entry, go to System Preferences, Keyboard, KeyBoard Shortcuts, Services and you'll see a list there you can modify)

1 comment:

lecanet said...

Great stuff! thanks, it worked like a charm on Mountain Lion :-)