Initializer

init(string:)

Initializes an utterance object with text to be spoken.

Declaration

init(string: String)

Parameters

string

A string containing text to be spoken.

Return Value

An AVSpeechUtterance object that can speak the specified text.

Discussion

To speak the text, the utterance must be passed to an instance of AVSpeechSynthesizer.