Framework

SoundAnalysis

Analyze streamed and file-based audio to classify it as a particular type.

Overview

Use the SoundAnalysis framework to analyze audio and recognize it as a particular type, such as laughter or applause. The framework performs its analysis using a Core ML model trained by an MLSoundClassifier. Using the framework’s ability to analyze streamed or file-based audio lets you add intelligent audio recognition capabilites to your app.

Topics

Audio Analyzers

Analyzing Audio to Classify Sounds

Use the SoundAnalysis framework and Core ML to analyze audio.

SNAudioFileAnalyzer

An object you create to analyze an audio file and provide the results to your app.

SNAudioStreamAnalyzer

An object you create to analyze a stream of audio data and provide the results to your app.

Configuration and Classification

SNClassifySoundRequest

A request to perform sound classification using a Core ML model.

SNClassificationResult

A result containing the highest-ranking classifications in the specified time range.

SNResultsObserving

The interface through which your app receives the results of an analysis request.

SNClassification

The model’s classification of the analyzed sound combined with its level of confidence in that classification.

Request Management

SNRequest

A protocol that defines the configuration of sound analysis requests.

SNResult

A protocol that defines the configuration of sound analysis results.

Errors

SNErrorDomain

A string that identifies the SoundAnalysis error domain.

SNErrorCode

The enumerated error codes produced by the SoundAnalysis framework.