Thursday, January 26, 2012

Text-to-Audio on my Mac

I recently experimented a little with creating speech from a given text.

First of all I had not known that this functionality existed on my Mac. A little web search discovered a number of pages explaining the functionality but for the sake of the reader (and maybe even more my own's sake not having to remember all this stuff) I'll describe it here.

There are two applications involved:
  1. TextEdit where you write the text to be converted to speech
  2. Automator which will do the conversion
So in the first step open TextEdit (Finder->Applications->TextEdit) and write some text which you would like to hear.
Then you need to start Automator (Finder->Applications->Automator).
  • In the first window choose the workflow Text .
  • Change the field Get content from and select TextEdit
  • Click the Choose button
  • In the lefthand column under Library click Text and in the next column double click Text to Audio File.
  • In the Text to Audio File frame you can choose a voice by selecting an entry in System Voice: I pick Alex.
  • Choose a filename (it will be saved in aiff format) and a location where to store the result.
  • Click the Run button in the upper righthand corner of Automator. Now your text should get transformed into speech and a file containing the output will be created.
  • Click the Results button in the Text to Audio File frame. Listen to result by double clicking on the file icon.
The recipe above works fine if you do text to speech translation once in a while.

Regular task:
If you do it regularily you can create an Automator workflow and reuse it whenever needed. Simply do a 'Save As...' and save this workflow under a recognizablee name. Note that it will always use the same output filename and location and this overwrites previous audio files.

More voices:
You can also download and install other voices if you're not happy with the standard ones. Good ones possibly need to be paid for, some sites offer trials e.g. InfoVox from Assistiveware.

Speech control:
You can insert certain control elements into the text to better control the speech like volume changes of certain words, extra pauses etc. I have been using the silence element e.g. a pause of 5 seconds can be achieved with [[slnc 5000]]
Here is a comprehensive list of speech commands from Apple (the page seems to be deprecated but the commands still work).

3 comments:

  1. Big Data and Hadoop is an ecosystem of open source components that fundamentally changes the way enterprises store, process, and analyze data.

    hadoop training in bangalore

    ReplyDelete
  2. Harvard Business Review named data scientist the "sexiest job of the 21st century".This Data Science course will cover the whole data life cycle ranging from Data Acquisition and Data Storage using R-Hadoop concepts, Applying modelling through R programming using Machine learning algorithms and illustrate impeccable Data Visualization by leveraging on 'R' capabilities.With companies across industries striving to bring their research and analysis (R&A) departments up to speed, the demand for qualified data scientists is rising.
    data science training in bangalore

    ReplyDelete
  3. myTectra Amazon Web Services (AWS) certification training helps you to gain real time hands on experience on AWS. myTectra offers AWS training in Bangalore using classroom and AWS Online Training globally. AWS Training at myTectra delivered by the experienced professional who has atleast 4 years of relavent AWS experince and overall 8-15 years of IT experience. myTectra Offers AWS Training since 2013 and retained the positions of Top AWS Training Company in Bangalore and India.
    aws training in bangalore

    ReplyDelete