<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MusicUnderstanding",
  "identifier" : "/documentation/MusicUnderstanding/MusicUnderstandingSession/init(audioProvider:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Music Understanding"
    ],
    "preciseIdentifier" : "s:18MusicUnderstanding0aB7SessionC13audioProviderACx_tcSciRz8AVFAudio24AVReadOnlyAudioPCMBufferV7ElementRtzs5NeverO7FailureRtzlufc"
  },
  "title" : "init(audioProvider:)"
}
-->

# init(audioProvider:)

Creates a music understanding session that accepts streaming audio buffers.

```
convenience init<Provider>(audioProvider: Provider) where Provider : AsyncSequence, Provider.Element == AVReadOnlyAudioPCMBuffer, Provider.Failure == Never
```

## Parameters

`audioProvider`

A non-throwing async sequence of audio buffers. The sequence must have `Failure == Never`, meaning callers are responsible for handling any errors in their audio pipeline before passing buffers to the session.

---

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)