Important: The information in this document is obsolete and should not be used for new development.
SRSpeakText
You can use theSRSpeakText
function 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
TheSRSpeakText
function causes the feedback character in the feedback window associated with the recognizer specified by therecognizer
parameter to speak the text specified by thespeakText
andspeakLength
parameters. While speaking, the feedback character lip-synchs 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 text pointed to by the
speakText
parameter 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 theSRSpeechBusy
function to determine whether the feedback character is already speaking. If it is, you can call theSRStopSpeech
function to stop that speaking immediately.SEE ALSO
TheSRSpeakText
function speaks the specified text but doesn't display it. Use theSRSpeakAndDrawText
function if you want to speak and display the text.