“Say” is a Terminal command that directs the Mac to speak anything you type after it. Try it out by launching Terminal (Finder > Applications > Utilities), and then typing the following into the command line: This command will direct your Mac to speak the word “hello” or whatever else you type after the initial “say” command. You can also specify which voice your Mac should use when it speaks using the -v attribute. For example: In this case, the voice named “Fred” is used to speak the entered command.
Mac’s Many Voices
The Mac has a lot of voices it can use for speech commands. Currently, there are over 100 voices available in various languages and styles. If you would like to scan and try out the full list of the voices, you can, either in Terminal or in the Mac System Preferences.
Accessing Voices in System Preferences
Accessing Voices in Terminal
An alternate method to view all the available voices is to enter the following command in Terminal: A pop-up window displays all the available voices your Mac can use. You will notice some voice check boxes are marked and others are not. The checked voices are displayed in the System Voice drop-down menu. Use this menu to select a voice you’d like to try out and then select the Play button to hear the voice speak a sentence or two. Terminal lists all of the available voices. When specifying a voice in Terminal, use all lowercase letters. If the name has a space in it, such as Bad News, place it in quotes, like this:
Time for Terminal to Sing
The Say command can speak for as long as a single line will allow. If you hit the return key, the command is executed, so the easiest way to produce long speeches is to type them into a text editor first and then copy and paste them into Terminal. The Say command understands some punctuation, including the period and the comma, both of which inject a slight pause into speaking the text. With the right combination of words, you can even get the Say command to sing. There are a few different voices that can be used for singing, all of them in the Novelty section of the Dictation & Speech preference pane. The ability of these voices to sing comes not from the text command but the character of the voice. Here are some more examples:
In the Hall of the Mountain King
The Cellos voice intonation is to the melody of In the Hall of the Mountain King. This will work with any string of text. Enter the following into Terminal to hear it:
Pomp and Circumstance
Try the following Terminal command for a bit of pomp on graduation day: