<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Sound Analysis"
    ],
    "preciseIdentifier" : "s:SC11SNErrorCodeLeV"
  },
  "title" : "SNError"
}
-->

# SNError

An error from the Sound Analysis framework.

```
struct SNError
```

## Topics

### Error Codes

[`static var invalidModel: SNError.Code`](/documentation/SoundAnalysis/SNError/invalidModel)

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

[`static var invalidFormat: SNError.Code`](/documentation/SoundAnalysis/SNError/invalidFormat)

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

[`static var invalidFile: SNError.Code`](/documentation/SoundAnalysis/SNError/invalidFile)

An error that indicates an audio file is invalid.

[`static var operationFailed: SNError.Code`](/documentation/SoundAnalysis/SNError/operationFailed)

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

[`static var unknownError: SNError.Code`](/documentation/SoundAnalysis/SNError/unknownError)

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

### Error Information

[`enum Code`](/documentation/SoundAnalysis/SNError/Code)

The enumerated error codes that the Sound Analysis framework produces.

### Error Domain

[`let SNErrorDomain: String`](/documentation/SoundAnalysis/SNErrorDomain)

A string that identifies the Sound Analysis error domain.

[`static var errorDomain: String`](/documentation/SoundAnalysis/SNError/errorDomain)

A statically accessible string that identifies the Sound Analysis error domain.

## Relationships

### Conforms To

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

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

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

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

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

[`CustomNSError`](/documentation/Foundation/CustomNSError)

---

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)