Defines a pointer to a text-done callback function that is called when the Speech Synthesis Manager has finished processing a buffer of text.
- macOS 10.0+
The speech channel that has finished processing input text.
The reference constant associated with the speech channel.
On return, a pointer to the next buffer of text to process or
NULLif your application has no additional text to be spoken. This parameter is mostly for internal use by the Speech Synthesis Manager.
On return, a pointer to the number of bytes of the text buffer pointed to by the
On return, a pointer to the control flags to be used in generating the next buffer of text.
If a text-done callback function is installed in a speech channel, then the Speech Synthesis Manager calls this function when it finishes processing a buffer of text. The Speech Synthesis Manager might not yet have completed finishing speaking the text and indeed might not have started speaking it.
You can specify a text-done callback function by passing the
so selector to
A common use of a text-done callback function is to alert
your application once the text passed to the
can be disposed of (or, when the text is contained within a locked
relocatable block, when the relocatable block can be unlocked). The
Speech Synthesis Manager copies the text you pass to the
into an internal buffer. Once it has finished processing the text,
you may dispose of the original text buffer, even if speech is not
yet complete. However, if you wish to write a callback function
that executes when speech is completed, see the definition of a speech-done
callback function below.
Although most applications will not need to, your callback
function can indicate to the Speech Synthesis Manager whether there
is another buffer of text to speak. If there is another buffer,
your callback function should reference it by setting the
to appropriate values. (Your callback function might also change
the control flags to be used to process the speech by altering the
value in the
Setting these parameters allows the Speech Synthesis Manager to
generate uninterrupted speech. If there is no more text to speak,
your callback function should set
In this case, the Speech Synthesis Manager ignores the
If your text-done callback function does not change the values
the text buffer just spoken will be spoken again.