From Text-to-Speech to mp3 on a Mac

7,623

Solution 1

Try to execute the following in a terminal:

say -o ~/Desktop/say.aiff  "Hello. I'm a Mac"

That will save the spoken text "Hello. I'm a Mac" to ~/Desktop/say.aiff. See the manpage of say (execute man say in a terminal) for more information and other file formats. You can also easily convert the .aiff-File to an mp3 with iTunes or a console based encoder like lame.

Solution 2

Honestly, I know it's not explicitly what you're asking for, but this is much faster and better. Select everything in the doc, right click > services > add to itunes as a spoken track. Then, Your file gets processed directly instead as an audio file. No terminal needed. Youtube video explanation: https://www.youtube.com/watch?v=dGEs77682s0

If you really want your computer to be reading to you while you're recording, you can do a quicktime audio recording using soundflower. SoundFlower is an app that sends your computers internal sounds to the recording.

Share:
7,623

Related videos on Youtube

Vandit Mehta
Author by

Vandit Mehta

Back-end Analyst Developer - Team Lead

Updated on September 17, 2022

Comments

  • Vandit Mehta
    Vandit Mehta over 1 year

    I wonder if there is an easy way to record the audio while a text is been read by my Mac using the built-in text-to-speech menu item of the text editor (TextEdit) of Mac OS X ?

  • trolle3000
    trolle3000 almost 14 years
    You can also substitute the "Hello. I'm a Mac" for any text file
  • trolle3000
    trolle3000 almost 14 years
    ... and I personally recommend adding -v Zarvox as the first option in the above command ;-)
  • lajuette
    lajuette almost 14 years
    substituting the String with a textfile won't work (or did you mean to substitute with the contents of said file?). But you can do this: cat textfile.txt | say -o ~/Desktop/say.aiff . It will make "say" speak the contents of textfil.txt and output it to say.aif.
  • trolle3000
    trolle3000 over 13 years
    my mistake. You can use say -f /path/to/file/file.txt
  • Claudio Poli
    Claudio Poli about 12 years
    You can write say -v ? to display a list of all available voices on your system.