speak
speak
TEXT

The speak statement speaks a word or phrase.

Parameters

This statement has one parameter:

text – the text to be spoken.

Description

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

- info("defaultvoice") -- returns the current default system voice.
- info("speaking") -- returns true if talking is occuring right now.
- info("speechrate") -- returns the current Panorama speech rate (words per minute).
- info("speechvoice") -- returns the current default system voice.
- info("speechvolume") -- returns the current Panorama speech volume.
- info("voices") -- returns a list of available speech synthesis voices on this system.
- pausespeaking -- pauses any talking that is currently happening.
- resumespeaking -- resumes speaking after a pause.
- speakaddress -- buffers up a street address to be spoken later by the speaknow statement.
- speakcharacters -- buffers up one or more characters to be spoken later by the speaknow statement.
- speakcharactersslowly -- buffers up one or more characters to be spoken later by the speaknow statement. Instead of speaking words, each individual character is spoken separately and slowly.
- speakdate -- buffers up a date to be spoken later by the speaknow statement.
- speakdigitpairs -- buffers up one or more digit pairs to be spoken later by the speaknow statement.
- speakdigits -- buffers up one or more digits to be spoken later by the speaknow statement.
- speakdollars -- buffers up a dollar amount to be spoken later by the speaknow statement.
- speakdollarsandcents -- buffers up a dollar and cents amount to be spoken later by the speaknow statement.
- speakletters -- buffers up one or more characters to be spoken later by the speaknow statement. Letters will be spoken individually, as upper or lower case. Numbers will be spoken as individual digits.
- speaknow -- speaks any buffered speech.
- speakphonenumber -- buffers up a phone number to be spoken later by the speaknow statement.
- speakscript -- speaks a speech synthesis script created in the Database Options dialog.
- speakstate -- buffers up a US State to be spoken later by the speaknow statement.
- speakthisrecord -- speaks the current record in the database (using the default speech script).
- speakwords -- buffers up one or more words to be spoken later by the speaknow statement.
- speechrate -- changes the speech rate (words per minute).
- speechscripts -- returns a lists of speech scripts in a database.
- speechvoice -- changes the default speech voice.
- speechvolume -- changes the default speech volume.
- stopspeaking -- stops any talking that is currently happening.
- voiceinfo( -- returns information about a speech synthesis voice.

History

Version | Status | Notes
10.0 | Updated | Carried 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.