Speech Synthesis

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 NSSpeechSynthesizer class.) Synthesizing speech requires two main steps:

  1. Create one or more AVSpeechUtterance objects containing text to be spoken. Optionally, configure speech parameters (such as voice and rate) for each utterance.

  2. Pass utterances to a AVSpeechSynthesizer object to produce spoken audio. Optionally, use that object to control or respond to ongoing speech.


Spoken Text Attributes

class AVSpeechUtterance

A chunk of text to be spoken, along with parameters that affect its speech.

class AVSpeechSynthesisVoice

A distinct voice for use in speech synthesis.

Speech Synthesis Controls

class AVSpeechSynthesizer

An object that produces synthesized speech from text utterances and provides controls for monitoring or controlling ongoing speech.

protocol AVSpeechSynthesizerDelegate

Methods you can implement to respond to events that occur during speech synthesis.