<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SoundAnalysis",
  "identifier" : "/documentation/SoundAnalysis/SNError/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Sound Analysis"
    ],
    "preciseIdentifier" : "c:@E@SNErrorCode"
  },
  "title" : "SNError.Code"
}
-->

# SNError.Code

The enumerated error codes that the Sound Analysis framework produces.

```
enum Code
```

## Topics

### Errors

[`SNErrorCodeInvalidModel`](/documentation/SoundAnalysis/SNError/Code/invalidModel)

An error that indicates the sound classifier’s underlying Core ML model is an invalid model type.

[`SNErrorCodeInvalidFormat`](/documentation/SoundAnalysis/SNError/Code/invalidFormat)

An error that indicates the audio data’s format isn’t valid.

[`SNErrorCodeInvalidFile`](/documentation/SoundAnalysis/SNError/Code/invalidFile)

An error that indicates an audio file is invalid.

[`SNErrorCodeOperationFailed`](/documentation/SoundAnalysis/SNError/Code/operationFailed)

An error that occurs when the framework fails to analyze audio.

[`SNErrorCodeUnknownError`](/documentation/SoundAnalysis/SNError/Code/unknownError)

An error that represents a failure that no other error handles.

## Relationships

### Conforms To

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

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

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

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

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

[`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)