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

# NSSpeechSynthesizer.SpeechPropertyKey.ErrorKey

Keys that identify errors that may occur during speech synthesis.

```
struct ErrorKey
```

## Discussion

Use these keys in the [`errors`](/documentation/AppKit/NSSpeechSynthesizer/SpeechPropertyKey/errors) dictionary.

## Topics

### Type Properties

[`static let count: NSSpeechSynthesizer.SpeechPropertyKey.ErrorKey`](/documentation/AppKit/NSSpeechSynthesizer/SpeechPropertyKey/ErrorKey/count)

The number of errors that have occurred in processing the current text string, since the last call to [`object(forProperty:)`](/documentation/AppKit/NSSpeechSynthesizer/object(forProperty:)) with the [`errors`](/documentation/AppKit/NSSpeechSynthesizer/SpeechPropertyKey/errors) property.  An `NSNumber`

[`static let newestCharacterOffset: NSSpeechSynthesizer.SpeechPropertyKey.ErrorKey`](/documentation/AppKit/NSSpeechSynthesizer/SpeechPropertyKey/ErrorKey/newestCharacterOffset)

The position in the text string of the most recent error that occurred since the last call to [`object(forProperty:)`](/documentation/AppKit/NSSpeechSynthesizer/object(forProperty:)) with the [`errors`](/documentation/AppKit/NSSpeechSynthesizer/SpeechPropertyKey/errors) property. An `NSNumber`.

[`static let newestCode: NSSpeechSynthesizer.SpeechPropertyKey.ErrorKey`](/documentation/AppKit/NSSpeechSynthesizer/SpeechPropertyKey/ErrorKey/newestCode)

The error code of the most recent error that occurred since the last call to [`object(forProperty:)`](/documentation/AppKit/NSSpeechSynthesizer/object(forProperty:)) with the [`errors`](/documentation/AppKit/NSSpeechSynthesizer/SpeechPropertyKey/errors) property.  An `NSNumber`

[`static let oldestCharacterOffset: NSSpeechSynthesizer.SpeechPropertyKey.ErrorKey`](/documentation/AppKit/NSSpeechSynthesizer/SpeechPropertyKey/ErrorKey/oldestCharacterOffset)

The position in the text string of the first error that occurred since the last call to [`object(forProperty:)`](/documentation/AppKit/NSSpeechSynthesizer/object(forProperty:)) with the [`errors`](/documentation/AppKit/NSSpeechSynthesizer/SpeechPropertyKey/errors) property.  An `NSNumber`

[`static let oldestCode: NSSpeechSynthesizer.SpeechPropertyKey.ErrorKey`](/documentation/AppKit/NSSpeechSynthesizer/SpeechPropertyKey/ErrorKey/oldestCode)

The error code of the first error that occurred since the last call to [`object(forProperty:)`](/documentation/AppKit/NSSpeechSynthesizer/object(forProperty:)) with the [`errors`](/documentation/AppKit/NSSpeechSynthesizer/SpeechPropertyKey/errors) property.  An `NSNumber`

### Initializers

[`init(rawValue: String)`](/documentation/AppKit/NSSpeechSynthesizer/SpeechPropertyKey/ErrorKey/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)