Begins speaking a text string.


OSErr SpeakString(ConstStr255Param textToBeSpoken);



The string to be spoken.

Return Value

A result code. See Result Codes.


The SpeakString function attempts to speak the Pascal-style text string contained in the string textToBeSpoken. Speech is produced asynchronously using the default system voice. When an application calls this function, the Speech Synthesis Manager makes a copy of the passed string and creates any structures required to speak it. As soon as speaking has begun, control is returned to the application. The synthesized speech is generated asynchronously to the application so that normal processing can continue while the text is being spoken. No further interaction with the Speech Synthesis Manager is required at this point, and the application is free to release the memory that the original string occupied.

If SpeakString is called while a prior string is still being spoken, the sound currently being synthesized is interrupted immediately. Conversion of the new text into speech is then begun. If you pass a zero-length string (or, in C, a null pointer) to SpeakString, the Speech Synthesis Manager stops any speech previously being synthesized by SpeakString without generating additional speech. If your application uses SpeakString, it is often a good idea to stop any speech in progress whenever your application receives a suspend event. Calling SpeakString with a zero-length string has no effect on speech channels other than the one managed internally by the Speech Synthesis Manager for the SpeakString function.)

The text passed to the SpeakString function may contain embedded speech commands.

See Also

Starting, Stopping, and Pausing Speech


Resumes speech paused by the PauseSpeechAt function.


Pauses speech on a speech channel.


Speaks a buffer of text, using certain flags to control speech behavior.


Begins speaking a string represented as a CFString object.


Begins speaking a buffer of text.


Terminates speech immediately on the specified channel.


Terminates speech delivery on a specified channel either immediately or at the end of the current word or sentence.