---
title: Speech synthesis
framework: AVFoundation
role: collectionGroup
path: avfoundation/speech-synthesis
---

# Speech synthesis

Configure voices to speak strings of text.

## Overview

Overview The Speech Synthesis framework manages voice and speech synthesis, and requires two primary tasks: Create an AVSpeechUtterance instance that contains the text to speak. Optionally, configure speech parameters, such as voice and rate, for each utterance. // Create an utterance. let utterance = AVSpeechUtterance(string: "The quick brown fox jumped over the lazy dog.")

// Configure the utterance. utterance.rate = 0.57 utterance.pitchMultiplier = 0.8 utterance.postUtteranceDelay = 0.2 utterance.volume = 0.8

// Retrieve the British English voice. let voice = AVSpeechSynthesisVoice(language: "en-GB")

// Assign the voice to the utterance. utterance.voice = voice Pass the utterance to an AVSpeechSynthesizer instance to produce spoken audio. // Create a speech synthesizer. let synthesizer = AVSpeechSynthesizer()

// Tell the synthesizer to speak the utterance. synthesizer.speak(utterance) Optionally, use the speech synthesizer instance to control or respond to ongoing speech; for example, assign its delegate to receive speech event notifications. note: Speech generation occurs on device and isn’t sent to a server for processing.

## Topics

### Spoken text attributes

- [AVSpeechUtterance](avfaudio/avspeechutterance.md)
- [AVSpeechSynthesisVoice](avfaudio/avspeechsynthesisvoice.md)

### Speech synthesis controls

- [AVSpeechSynthesizer](avfaudio/avspeechsynthesizer.md)

### Speech synthesis audio unit

- [AVSpeechSynthesisProviderAudioUnit](avfaudio/avspeechsynthesisprovideraudiounit.md)

## See Also

### Audio

- [Audio playback, recording, and processing](avfoundation/audio-playback-recording-and-processing.md)
