From Text-to-Speech to mp3 on a Mac

4

6

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 ?

Pierre Watelet

Posted 2010-08-17T11:07:31.773

Reputation: 4 269

Answers

8

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.

lajuette

Posted 2010-08-17T11:07:31.773

Reputation: 4 364

You can also substitute the "Hello. I'm a Mac" for any text file – trolle3000 – 2010-08-17T12:03:14.083

... and I personally recommend adding -v Zarvox as the first option in the above command ;-) – trolle3000 – 2010-08-17T12:04:16.533

1substituting 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. – lajuette – 2010-08-17T12:20:13.690

1my mistake. You can use say -f /path/to/file/file.txt – trolle3000 – 2010-08-23T04:00:47.387

1You can write say -v ? to display a list of all available voices on your system. – Claudio Poli – 2012-04-26T21:10:05.367

0

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.

Talos Potential

Posted 2010-08-17T11:07:31.773

Reputation: 131