Instance Method

speakUtterance:

Enqueues an utterance to be spoken.

Declaration

- (void)speakUtterance:(AVSpeechUtterance *)utterance;

Parameters

utterance

An AVSpeechUtterance object containing text to be spoken.

Discussion

The AVSpeechUtterance object not only contains the text to be spoken, but also parameters controlling speech synthesis such as voice, pitch, and delays between utterances.

Calling this method adds the utterance to a queue; utterances are spoken in the order in which they are added to the queue. If the synthesizer is not currently speaking, the utterance is spoken immediately. Attempting to enqueue AVSpeechUtterance instance multiple times throws an exception.

See Also