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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software