<!--
{
  "availability" : [
    "macOS: 10.3.0 - 14.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSpeechSynthesizer/VoiceAttributeKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSVoiceAttributeKey"
  },
  "title" : "NSSpeechSynthesizer.VoiceAttributeKey"
}
-->

# NSSpeechSynthesizer.VoiceAttributeKey

The following constants are keys for the dictionary returned by [`attributes(forVoice:)`](/documentation/AppKit/NSSpeechSynthesizer/attributes(forVoice:)).

```
struct VoiceAttributeKey
```

## Overview

The following are the identifiers of the macOS system voices (defined in `/System/Library/Speech/Voices`):

```objc
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`](/documentation/AppKit/NSSpeechSynthesizer/VoiceAttributeKey/identifier)

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

[`static let name: NSSpeechSynthesizer.VoiceAttributeKey`](/documentation/AppKit/NSSpeechSynthesizer/VoiceAttributeKey/name)

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

[`static let age: NSSpeechSynthesizer.VoiceAttributeKey`](/documentation/AppKit/NSSpeechSynthesizer/VoiceAttributeKey/age)

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

[`static let gender: NSSpeechSynthesizer.VoiceAttributeKey`](/documentation/AppKit/NSSpeechSynthesizer/VoiceAttributeKey/gender)

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

[`static let demoText: NSSpeechSynthesizer.VoiceAttributeKey`](/documentation/AppKit/NSSpeechSynthesizer/VoiceAttributeKey/demoText)

A demonstration string to speak. An `NSString`

[`static let localeIdentifier: NSSpeechSynthesizer.VoiceAttributeKey`](/documentation/AppKit/NSSpeechSynthesizer/VoiceAttributeKey/localeIdentifier)

The language of the voice.  An `NSString`

[`static let supportedCharacters: NSSpeechSynthesizer.VoiceAttributeKey`](/documentation/AppKit/NSSpeechSynthesizer/VoiceAttributeKey/supportedCharacters)

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

[`static let individuallySpokenCharacters: NSSpeechSynthesizer.VoiceAttributeKey`](/documentation/AppKit/NSSpeechSynthesizer/VoiceAttributeKey/individuallySpokenCharacters)

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

### Deprecated

[`extern NSVoiceAttributeKey const NSVoiceLanguage;`](/documentation/AppKit/NSVoiceLanguage)

The language of the voice (currently US English only). An `NSString`

### Initializers

[`init(rawValue: String)`](/documentation/AppKit/NSSpeechSynthesizer/VoiceAttributeKey/init(rawValue:))

## Relationships

### Conforms To

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

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

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

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

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

---

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)