Class

AVSpeechSynthesisVoice

A distinct voice for use in speech synthesis.

Declaration

@interface AVSpeechSynthesisVoice : NSObject

Overview

In speech synthesis, voices are distinguished primarily by language, locale, and quality. Use this class to select a voice appropriate to the language of text to be spoken, or to select a voice exhibiting a particular local variant of that language (such as Australian or South African English).

To select a voice for use in speech, obtain an AVSpeechSynthesisVoice instance using one of the methods in Finding Voices, and then set it as the value of the voice property on an AVSpeechUtterance instance containing text to be spoken. For a complete list of supported languages, see Languages Supported by VoiceOver.

Topics

Finding Voices

+ voiceWithIdentifier:

Returns a voice object for the specified identifier.

+ voiceWithLanguage:

Returns a voice object for the specified language and locale.

+ speechVoices

Returns all available voices.

AVSpeechSynthesisVoiceIdentifierAlex

The voice object identified as Alex.

Identifying Voices

identifier

The unique identifier for a voice object.

name

The name for a voice object.

quality

The speech quality for a voice object.

AVSpeechSynthesisVoiceQuality

The voice object's speech quality.

Working with Language Codes

+ currentLanguageCode

Returns the code for the user’s current locale.

language

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

Instance Properties

Relationships

Inherits From

Conforms To

See Also

Spoken Text Attributes

AVSpeechUtterance

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software