How to Make a Mac Talk: Text to Speech

Mar 28, 2010 - 18 Comments

Text to speech in Mac OS X You can make your Mac talk to you in various different ways and even speaking with different voices, all by using the powerful built-in Text-to-Speech abilities of Mac OS X. With this, you can either speak a few words, phrases, or even an entire document.

We’ll cover the two quickest and easiest ways by using the simple text editor TextEdit, which comes with all Macs, and the command line ‘say’ trick by way of the Terminal application. We’ll also show you how to change the voices used, and the rate of speech (meaning, how fast the words are spoken).

Make a Mac Talk with TextEdit

You can speak existing text or typing anything out to have it spoken too:

  • Set the cursor to where you’d like the text to be spoken (default will be the beginning of the document or text)
  • From the Edit menu, pull down to ‘Speech’
  • Select ‘Start Speaking’

Speech begins immediately through this method.

make your mac talk

Speech will continue until all words have been read, or until the speech has been stopped by going to the same Speech menu and choosing “Stop Speaking”. This will use whatever the default voice is in Mac OS X.

Change the Voice & Rate of Speech

If you want to change the default voice, you will find it is set in the “Dictation & Speech” control panel:

  • Open System Preferences from the  Apple menu and choose “Dictation & Speech”
  • Under the “Speech” tab, adjust the selection found within the “System Voice” menu

You can also adjust things like speaking rate through that same preference panel. Whatever voice is chosen there becomes the new default. You can also add voices if you decide the ones you hear aren’t working for you.

Make your Mac Talk with the Terminal and “say” command

This will rely on the command line, and thus may be considered slightly more advanced. Nonetheless, it’s still extremely easy to use, so don’t be shy to try it out:

  • Launch the Terminal app, found within /Applications/Utilities, and type the ‘say’ command followed by a word or phrase, like so:
  • say hello I love osxdaily.com

The output voice is going to be the same as the system default, which is set in the aforementioned “Speech” System Preference panel. The terminal is a bit more powerful than the standard text-to-speech engine though, and you can easily specify a new voice by using the -v flag, followed by the voicename as it’s labeled in OS X. For example, to use the ‘agnes’ voice:

say -v agnes "this sure is a fancy voice! well maybe not, but I do love osxdaily.com"

Rate of speech can be adjusted with -r like so:

say -v Samantha -r 2000 "Hello I like to talk super fast"

You can use the ‘say’ command with just about anything, and it can also be used remotely through SSH if you feel like making a remote Mac start talking.

Speak Entire Files with the ‘say’ Command

The say command can also be used to speak an entire file by using the -f flag like so:
say -f filename.txt

For example, to speak a file named “TheAmericanDictionary.rtf” found on the desktop, you would use the following command:

say -f ~/Desktop/TheAmericanDictionary.rtf

Do note that the say command will speak the entire command unless it has been halted by hitting CONTROL+C together to end the speech engine.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in How to, Mac OS X

18 Comments

» Comments RSS Feed

  1. Joshua Schmidt says:

    News Anchor will read your RSS feeds using text to speech

  2. Peter Daniels says:

    Is it possible to change how it processes some character combos? My daughter’s name is ubnusual and has the zh as in jacques sound but I can’t get it to pronounce this, she is (mildly) disappointed.

  3. [...] the past I have combined this with the text to speech ’say’ command to play some amusing pranks on [...]

  4. [...] in Lion’s new Speech preferences. As you can hear, they are significantly improved from the current voices in Mac OS X text-to-speech, some of which are comically drone-like (Cellos [...]

  5. Ricardo Flamingo says:

    Is there any place to download different voices? I had real sexy female voice I liked that came with Tiger. I don’t have it in Leopard. If so, how would I install it?

  6. [...] OS X, Tips & Tricks – June 28th, 2011 – Leave a Comment Using Mac OS X Text to Speech tools, we can convert any .RTF or .TXT file into a spoken audio file which can then be transferred [...]

  7. [...] are one of the many new great features in Mac OS X Lion, you can test out the new voices with the standard text-to-speech methods of making your Mac talk to you, either through compatible apps or the command line [...]

  8. Eddy says:

    Why does it that when I paste something or have it read my email does it not stop to breath between periods? It reads like a run on. It’ll actually top at the end of sentences properly if there is a separate paragraph the text to speech is about to read. It’s as if it doesn’t recognize the periods in a group of sentences in a paragraph. Just one long speech. Any ideas to fix that?

  9. HarryMonmouth says:

    Surely there must be more to it than this. I would think that tts is a feature that would be of most use to blind people.
    I am not blind but at the moment I want to have a webpage read out and I have to say opening the terminal, typing say and then pasting the contents of the webpage or doing similar with textedit seem like far too much trouble.
    How is someone who is blind going to cope if that is how text to speech works.
    I would have imagined if it does not have a simple shortcut to start it then it is not fit for purpose; that does not sound like Apple.

    • HarryMonmouth says:

      Surely there must be more to it than this. I would think that tts is a feature that would be of most use to blind people.
      I am not blind but at the moment I want to have a webpage read out and I have to say opening the terminal, typing say and then pasting the contents of the webpage or doing similar with textedit seem like far too much trouble.
      How is someone who is blind going to cope if that is how text to speech works.
      I would have imagined if it does not have a simple shortcut to start it then it is not fit for purpose; that does not sound like Apple.

      Actually I have already found a better way so maybe this article needs updating. I simply selected a section of text and when I did a two finger click I found an option at the bottom of the list to add the text to itunes as a spoken track. It is still not good enough in my opinion. But it is better.

      • juzzyD says:

        Easier still Harry, if you open system preferences and go into the speech settings, you can turn the hotkey on.

        Once switched on, just select text you want to hear and press Opt+Esc

  10. [...] say” portion, which can also be customized with other voices from Mac OS X’s text to speech options by using the -v flag followed by a voice name, like [...]

  11. Donovan says:

    For those who think that blind people use this method, I can tell you that we don’t. What you guys are playing with here is raw input ran right in to the speech engine. What we use is a program that layers over the engine. A screen reader, or in this case it is called Voice Over, takes the text from programs and then runs it thru the engine. It also allows us to use certain keys to logically navigate in computer programs. To give it a try hit Command+F5 to toggle it on and off.

  12. [...] the voice active you can now use any of Mac OS X’s text to speech abilities to hear Siri talk to [...]

  13. [...] help in much the same way that typing things how they sound rather than are spelled can help with text-to-speech. Background noise can easily mess up the conversions too, so it’s best to use in an otherwise [...]

  14. Matthew says:

    You can also go to speech in preferences, select speech, in the text to speech tab, look for the check box that says “speak selected text when the key… is pressed” by default it is option+escape, but you need to turn this on. That allows you make it speak any text that you selected.

  15. [...] note that text to speech will no longer function at all if you do this. It’s also possible to delete all voices using [...]

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates