Instance Property

language

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

Declaration

var language: String { get }

Discussion

The language of a voice controls the conversion of text to spoken phonemes, so the text spoken in an AVSpeechUtterance should be written in the language matching that of the voice assigned to that utterance. The locale of a voice reflects regional variations in pronunciation or accent; for example, a voice with code en-US speaks English text with a North American accent, and a voice with code en-AU speaks English text with an Australian accent.

See Also

Working with Language Codes

class func currentLanguageCode() -> String

Returns the code for the user’s current locale.

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