The speak statement speaks a word or phrase.


This statement has one parameter:

text – the text to be spoken.


This statement speaks a word or phrase.

speak "Hello, I am Panorama Ten!"

You can optionally specify the voice, volume and speaking rate. These options can be specified in any order, and can be omitted if you want to use the defaults.

speak "Hello","voice","Victoria","Volume",0.5,"Rate",250

The voice name must be exactly correct, including upper and lower case. You can use the info(“voices”) function to return a list of the available voices. Some of the more common voices include Alex and Victoria.

The volume must be a number from 0 (silent) to 1.0 (full volume).

The rate is the number of words per minute. Normal speech is usually between 150 and 250 words per minute.

In addition to specifying the voice, volume and rate in the speak statement, you can also set the default voice, volume and rate using the speechvoice, speechvolume and speechrate statements. This is especially handy when you want to speak several items in a row with the same settings.

speechvoice "Kathy"
speechrate 220
speak "Hello, this is Kathy."

When you specify the voice, volume and/or speaking rate in the speak statement itself, that choice is only for that particular speak statement. After that text has been spoken, the defaults will go back to whatever was last set with the speechvoice, speechvolume and speechrate statements.

Creating an Audio File

If you specify a path option, the audio will be written to a file instead of being spoken immediately. This example will create an audio file named Space Oddyssey.aif on the desktop containing the narration.

speak "Open the pod bay doors, Hal","path","~/Desktop/Space Oddyssey.aif"

See Also


10.0UpdatedCarried over from Panorama 6.0, but now allows the voice, volume and rate to be customized, and allows the narration to be saved to a file.