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

# AVSpeechSynthesisVoice

A distinct voice for use in speech synthesis.

```
class AVSpeechSynthesisVoice
```

## Overview

The primary factors that distinguish a voice in speech synthesis are language, locale, and quality. Create an instance of `AVSpeechSynthesisVoice` to select a voice that’s appropriate for the text and the language, and set it as the value of the [`voice`](/documentation/AVFAudio/AVSpeechUtterance/voice) property on an [`AVSpeechUtterance`](/documentation/AVFAudio/AVSpeechUtterance) instance. The voice may optionally reflect a local variant of the language, such as Australian or South African English. For a complete list of supported languages, see [Languages Supported by VoiceOver](https://support.apple.com/en-us/HT206175).

## Topics

### Creating a voice

[`init?(identifier: String)`](/documentation/AVFAudio/AVSpeechSynthesisVoice/init(identifier:))

Retrieves a voice for the identifier you specify.

[`init?(language: String?)`](/documentation/AVFAudio/AVSpeechSynthesisVoice/init(language:))

Retrieves a voice for the BCP 47 code language code you specify.

[`class func speechVoices() -> [AVSpeechSynthesisVoice]`](/documentation/AVFAudio/AVSpeechSynthesisVoice/speechVoices())

Retrieves all available voices on the device.

[`let AVSpeechSynthesisVoiceIdentifierAlex: String`](/documentation/AVFAudio/AVSpeechSynthesisVoiceIdentifierAlex)

The voice that the system identifies as Alex.

### Inspecting voices

[`var identifier: String`](/documentation/AVFAudio/AVSpeechSynthesisVoice/identifier)

The unique identifier of a voice.

[`var name: String`](/documentation/AVFAudio/AVSpeechSynthesisVoice/name)

The name of a voice.

[`var quality: AVSpeechSynthesisVoiceQuality`](/documentation/AVFAudio/AVSpeechSynthesisVoice/quality)

The speech quality of a voice.

[`var gender: AVSpeechSynthesisVoiceGender`](/documentation/AVFAudio/AVSpeechSynthesisVoice/gender)

The gender for a voice.

[`var voiceTraits: AVSpeechSynthesisVoice.Traits`](/documentation/AVFAudio/AVSpeechSynthesisVoice/voiceTraits)

The traits of a voice.

[`var audioFileSettings: [String : Any]`](/documentation/AVFAudio/AVSpeechSynthesisVoice/audioFileSettings)

A dictionary that contains audio file settings.

[`enum AVSpeechSynthesisVoiceQuality`](/documentation/AVFAudio/AVSpeechSynthesisVoiceQuality)

The speech quality of a voice.

[`enum AVSpeechSynthesisVoiceGender`](/documentation/AVFAudio/AVSpeechSynthesisVoiceGender)

The gender for a voice.

[`struct Traits`](/documentation/AVFAudio/AVSpeechSynthesisVoice/Traits)

Traits that describe a voice.

### Working with language codes

[`class func currentLanguageCode() -> String`](/documentation/AVFAudio/AVSpeechSynthesisVoice/currentLanguageCode())

Returns the language and locale code for the user’s current locale.

[`var language: String`](/documentation/AVFAudio/AVSpeechSynthesisVoice/language)

A BCP 47 code that contains the voice’s language and locale.

### Initializers

[`init?(coder: NSCoder)`](/documentation/AVFAudio/AVSpeechSynthesisVoice/init(coder:))

## Relationships

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`Hashable`](/documentation/Swift/Hashable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`Equatable`](/documentation/Swift/Equatable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)