Carbon


SRSpeakText

Header: SpeechRecognition.h Carbon status: Supported

Causes the feedback character in the feedback window to speak a text string.

OSErr SRSpeakText (
    SRRecognizer recognizer, 
    const void *speakText, 
    Size speakLength
);
Parameter descriptions
recognizer

A recognizer.

speakText

A pointer to a buffer that contains the text to be spoken. The text pointed to by the speakText parameter can contain embedded speech commands to enhance the prosody of the spoken string.

speakLength

The size, in bytes, of the specified text.

function result

A result code.

DISCUSSION

While speaking, the feedback character lip-syncs the spoken string using the Speech Synthesis Manager’s phoneme callback routines. SRSpeakText uses the default voice and rate selected in the Speech control panel. (The Speech Synthesis Manager was formerly called the Speech Manager. Its name has been changed to distinguish it from the Speech Recognition Manager and to describe its operation more clearly.)

You can use the SRSpeechBusy function to determine whether the feedback character is already speaking. If it is, you can call the SRStopSpeech function to stop that speaking immediately.

The SRSpeakText function speaks the specified text but does not display it. Use the SRSpeakAndDrawText function if you want to speak and display the text.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 7/10/2000)