Convert text to spoken audio.
The Speech Synthesis framework manages voices and speech synthesis for iOS, tvOS, and watchOS. (To perform text-to-speech tasks in macOS, use the
NSSpeech class.) Synthesizing speech requires two main steps:
Create one or more
AVSpeechobjects containing text to be spoken. Optionally, configure speech parameters (such as voice and rate) for each utterance.
Pass utterances to a
AVSpeechobject to produce spoken audio. Optionally, use that object to control or respond to ongoing speech.