<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVSpeechSynthesisProviderAudioUnit",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVSpeechSynthesisProviderAudioUnit"
  },
  "title" : "AVSpeechSynthesisProviderAudioUnit"
}
-->

# AVSpeechSynthesisProviderAudioUnit

An object that generates speech from text.

```
class AVSpeechSynthesisProviderAudioUnit
```

## Overview

Use a speech synthesizer audio unit to generate audio buffers that contain speech for a given voice and speech markup. The audio unit receives an [`AVSpeechSynthesisProviderRequest`](/documentation/AVFAudio/AVSpeechSynthesisProviderRequest) as input, and extracts audio buffers through the render block.

Use [`speechSynthesisOutputMetadataBlock`](/documentation/AVFAudio/AVSpeechSynthesisProviderAudioUnit/speechSynthesisOutputMetadataBlock) to provide metadata as an array of [`AVSpeechSynthesisMarker`](/documentation/AVFAudio/AVSpeechSynthesisMarker).

The system scans and loads voices for audio unit extensions of this type, and the voices it provides are available for use in [`AVSpeechSynthesizer`](/documentation/AVFAudio/AVSpeechSynthesizer) and accessibility technologies like VoiceOver and Speak Screen.

> Important:
> Network access isn’t allowed in speech synthesizers.

## Topics

### Rendering speech

[`synthesizeSpeechRequest(_:)`](/documentation/AVFAudio/AVSpeechSynthesisProviderAudioUnit/synthesizeSpeechRequest(_:))

Sets the text to synthesize and the voice to use.

[`AVSpeechSynthesisProviderRequest`](/documentation/AVFAudio/AVSpeechSynthesisProviderRequest)

An object that represents the text to synthesize and the voice to use.

### Supplying metadata

[`AVSpeechSynthesisProviderOutputBlock`](/documentation/AVFAudio/AVSpeechSynthesisProviderOutputBlock)

A type that represents the method for sending marker information to the host.

[`speechSynthesisOutputMetadataBlock`](/documentation/AVFAudio/AVSpeechSynthesisProviderAudioUnit/speechSynthesisOutputMetadataBlock)

A block that subclasses use to send marker information to the host.

[`AVSpeechSynthesisMarker`](/documentation/AVFAudio/AVSpeechSynthesisMarker)

An object that contains information about the synthesized audio.

### Getting and setting voices

[`speechVoices`](/documentation/AVFAudio/AVSpeechSynthesisProviderAudioUnit/speechVoices)

A list of voices the audio unit provides to the system.

[`AVSpeechSynthesisProviderVoice`](/documentation/AVFAudio/AVSpeechSynthesisProviderVoice)

An object that represents a voice that an audio unit provides to its host.

### Cancelling a request

[`cancelSpeechRequest()`](/documentation/AVFAudio/AVSpeechSynthesisProviderAudioUnit/cancelSpeechRequest())

Informs the audio unit to discard the speech request.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)