How to Make a Mac Talk: Text to Speech
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.
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.