Important: The information in this document is obsolete and should not be used for new development.
SRSpeakText
You can use theSRSpeakTextfunction to have the feedback character in the feedback window speak a text string.
pascal OSErr SRSpeakText ( SRRecognizer recognizer, const void *speakText, Size speakLength);
recognizer- A recognizer.
speakText- The address of a buffer that contains the text to be spoken.
speakLength- The size, in bytes, of the specified text.
DESCRIPTION
TheSRSpeakTextfunction causes the feedback character in the feedback window associated with the recognizer specified by therecognizerparameter to speak the text specified by thespeakTextandspeakLengthparameters. While speaking, the feedback character lip-synchs the spoken string using the Speech Synthesis Manager's phoneme callback routines.SRSpeakTextuses the default voice and rate selected in the Speech control panel.The text pointed to by the
speakTextparameter can contain embedded speech commands to enhance the prosody of the spoken string. See the chapter "Speech Manager" in Inside Macintosh: Sound for a complete discussion of embedded speech commands.
- Note
- 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.
![]()
SPECIAL CONSIDERATIONS
You can use theSRSpeechBusyfunction to determine whether the feedback character is already speaking. If it is, you can call theSRStopSpeechfunction to stop that speaking immediately.SEE ALSO
TheSRSpeakTextfunction speaks the specified text but doesn't display it. Use theSRSpeakAndDrawTextfunction if you want to speak and display the text.