Class

AVSpeechSynthesisVoice

An AVSpeechSynthesisVoice object defines a distinct voice for use in speech synthesis. Voices are distinguished primarily by language and locale.

Overview

You can 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.

Symbols

Finding Voices

init?(language: String?)

Returns a voice object for the specified language and locale.

class func speechVoices()

Returns all available speech voices.

Working with Language Codes

class func currentLanguageCode()

Returns the code for the user’s current locale.

var language: String

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

Relationships

Inherits From