AVSpeech object defines a distinct voice for use in speech synthesis. Voices are distinguished primarily by language and locale.
- iOS 7.0+
- tvOS 9.0+
- watchOS 2.0+
You can use this class to select a voice appropriate to the language of text to be spoken, or to select a voice exhibiting a particular local variant of that language (such as Australian or South African English).
To select a voice for use in speech, obtain an
AVSpeech instance using one of the methods in Finding Voices, and then set it as the value of the
voice property on an
AVSpeech instance containing text to be spoken.