<!--
{
  "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/SNAudioFileAnalyzer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Sound Analysis"
    ],
    "preciseIdentifier" : "c:objc(cs)SNAudioFileAnalyzer"
  },
  "title" : "SNAudioFileAnalyzer"
}
-->

# SNAudioFileAnalyzer

An analyzer that runs sound classification requests on an audio file.

```
class SNAudioFileAnalyzer
```

## Overview

Run an [`SNRequest`](/documentation/SoundAnalysis/SNRequest) on an audio file by creating an `SNAudioFileAnalyzer`. You can run the same sound analysis request on multiple file analyzers, and each analyzer can process multiple requests. An audio file analyzer generates an [`SNResult`](/documentation/SoundAnalysis/SNResult) each time any of its active requests recognizes a sound.

## Topics

### Creating an Analyzer

[`-  initWithURL:error:`](/documentation/SoundAnalysis/SNAudioFileAnalyzer/init(url:)-336no)

Creates a new audio file analyzer.

### Managing Requests

[`-  addRequest:withObserver:error:`](/documentation/SoundAnalysis/SNAudioFileAnalyzer/add(_:withObserver:))

Adds a new analysis request to the audio file analyzer.

[`SNRequest`](/documentation/SoundAnalysis/SNRequest)

A protocol that represents sound analysis requests.

[`SNResultsObserving`](/documentation/SoundAnalysis/SNResultsObserving)

The interface your app implements to receive the results of an analysis request.

[`-  removeRequest:`](/documentation/SoundAnalysis/SNAudioFileAnalyzer/remove(_:))

Removes an existing request from the audio file analyzer.

[`-  removeAllRequests`](/documentation/SoundAnalysis/SNAudioFileAnalyzer/removeAllRequests())

Removes all the sound analysis requests from the audio file analyzer.

### Analyzing Data

[`-  analyze`](/documentation/SoundAnalysis/SNAudioFileAnalyzer/analyze())

Analyzes the audio file synchronously.

[`-  analyzeWithCompletionHandler:`](/documentation/SoundAnalysis/SNAudioFileAnalyzer/analyze(completionHandler:))

Analyzes the audio file asynchronously.

[`-  cancelAnalysis`](/documentation/SoundAnalysis/SNAudioFileAnalyzer/cancelAnalysis())

Cancels all the asynchronous sound analysis requests the analyzer is currently processing.

## Relationships

### Conforms To

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

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

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

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

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

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

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)