speak
phrase with
gender voice
with
voice
voice
Phrase and voice yield string
s. Gender is male
, female
, or neuter.
The speak
command speaks the specified phrase using a text-to-speech synthesizer. If the voice is specified, the phrase will be read using the specified voice. Otherwise, the default voice is used.
The speak
command is asynchronous: it will return immediately while the speech keeps playing in the background. If there is already text being spoken, the next text to be spoken will be added to a queue. The stop speech
command will stop all current and pending speech.
HyperTalk and OpenXION running under Mac OS use the speech synthesizer built in to Mac OS. OpenXION running under other platforms will use JSAPI (Java Speech API), if available. If JSAPI is not available, speak
will do nothing but set the result
to an error message.