<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Speech",
  "identifier" : "/documentation/Speech/SFSpeechError/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Speech"
    ],
    "preciseIdentifier" : "c:@E@SFSpeechErrorCode"
  },
  "title" : "SFSpeechError.Code"
}
-->

# SFSpeechError.Code

Error codes that can be thrown under the Speech framework’s error domain.

```
enum Code
```

## Topics

### Audio input errors

[`audioDisordered`](/documentation/Speech/SFSpeechError/Code/audioDisordered)

The audio input time-code overlaps or precedes prior audio input.

[`SFSpeechError.Code.audioReadFailed`](/documentation/Speech/SFSpeechError/Code/audioReadFailed)

The audio source could not be read.

### Audio format errors

[`incompatibleAudioFormats`](/documentation/Speech/SFSpeechError/Code/incompatibleAudioFormats)

The selected modules do not have an audio format in common or do not support an audio format.

[`unexpectedAudioFormat`](/documentation/Speech/SFSpeechError/Code/unexpectedAudioFormat)

The audio input is in unexpected format.

### Asset errors

[`assetLocaleNotAllocated`](/documentation/Speech/SFSpeechError/Code/assetLocaleNotAllocated)

The asset locale has not been allocated, but module requires it.

[`cannotAllocateUnsupportedLocale`](/documentation/Speech/SFSpeechError/Code/cannotAllocateUnsupportedLocale)

The asset locale being requested is not supported by SpeechFramework.

[`noModel`](/documentation/Speech/SFSpeechError/Code/noModel)

The selected locale/options does not have an appropriate model available or downloadable.

[`SFSpeechError.Code.timeout`](/documentation/Speech/SFSpeechError/Code/timeout)

The operation timed out.

[`tooManyAssetLocalesAllocated`](/documentation/Speech/SFSpeechError/Code/tooManyAssetLocalesAllocated)

The application has allocated too many locales.

### Custom language model errors

[`SFSpeechError.Code.malformedSupplementalModel`](/documentation/Speech/SFSpeechError/Code/malformedSupplementalModel)

The custom language model file was malformed.

[`SFSpeechError.Code.missingParameter`](/documentation/Speech/SFSpeechError/Code/missingParameter)

A required parameter is missing/nil.

[`SFSpeechError.Code.undefinedTemplateClassName`](/documentation/Speech/SFSpeechError/Code/undefinedTemplateClassName)

The custom language model templates were malformed.

### Other errors

[`insufficientResources`](/documentation/Speech/SFSpeechError/Code/insufficientResources)

There are not sufficient resources available on-device to process the incoming transcription request.

[`SFSpeechError.Code.internalServiceError`](/documentation/Speech/SFSpeechError/Code/internalServiceError)

There was an internal error.

[`moduleOutputFailed`](/documentation/Speech/SFSpeechError/Code/moduleOutputFailed)

The module’s result task failed.



---

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)