Structure

NSSpeechSynthesizer.VoiceAttributeKey

The following constants are keys for the dictionary returned by attributes(forVoice:).

Declaration

struct VoiceAttributeKey

Overview

Listing 1 lists the identifiers of the system voices (defined in /System/Library/Speech/Voices):

Listing 1

Identifiers of the macOS system voices

com.apple.speech.synthesis.voice.Agnes
com.apple.speech.synthesis.voice.Albert
com.apple.speech.synthesis.voice.Alex
com.apple.speech.synthesis.voice.BadNews
com.apple.speech.synthesis.voice.Bahh
com.apple.speech.synthesis.voice.Bells
com.apple.speech.synthesis.voice.Boing
com.apple.speech.synthesis.voice.Bruce
com.apple.speech.synthesis.voice.Bubbles
com.apple.speech.synthesis.voice.Cellos
com.apple.speech.synthesis.voice.Deranged
com.apple.speech.synthesis.voice.Fred
com.apple.speech.synthesis.voice.GoodNews
com.apple.speech.synthesis.voice.Hysterical
com.apple.speech.synthesis.voice.Junior
com.apple.speech.synthesis.voice.Kathy
com.apple.speech.synthesis.voice.Organ
com.apple.speech.synthesis.voice.Princess
com.apple.speech.synthesis.voice.Ralph
com.apple.speech.synthesis.voice.Trinoids
com.apple.speech.synthesis.voice.Vicki
com.apple.speech.synthesis.voice.Victoria
com.apple.speech.synthesis.voice.Whisper
com.apple.speech.synthesis.voice.Zarvox

Topics

Voice Attribute Keys

static let identifier: NSSpeechSynthesizer.VoiceAttributeKey

A unique string identifying the voice. The identifiers of the system voices are listed in Listing 1.

static let name: NSSpeechSynthesizer.VoiceAttributeKey

The name of the voice suitable for display. An NSString.

static let age: NSSpeechSynthesizer.VoiceAttributeKey

The perceived age (in years) of the voice. An NSString

static let gender: NSSpeechSynthesizer.VoiceAttributeKey

The perceived gender of the voice. The supported values are listed in Voice Gender Keys. An NSString

static let demoText: NSSpeechSynthesizer.VoiceAttributeKey

A demonstration string to speak. An NSString

static let supportedCharacters: NSSpeechSynthesizer.VoiceAttributeKey

A list of Unicode character id ranges that define the Unicode characters supported by this voice.

static let individuallySpokenCharacters: NSSpeechSynthesizer.VoiceAttributeKey

A list of Unicode character id ranges that define the Unicode characters that can be spoken in character-by-character mode by this voice.

Relationships

See Also

Getting Speech Synthesizer Information