<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/AudioReader/read(contentsOf:configuration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents11AudioReaderV4read10contentsOf13configurationAC12AsyncBuffersV10Foundation3URLV_AC13ConfigurationVtKFZ"
  },
  "title" : "read(contentsOf:configuration:)"
}
-->

# read(contentsOf:configuration:)

Reads an audio file as an async sequence of audio buffers.

```
static func read(contentsOf url: URL, configuration: AudioReader.Configuration = .init()) throws -> AudioReader.AsyncBuffers
```

## Parameters

`url`

An audio file URL.

`configuration`

The configuration for reading buffers.

## Return Value

An async sequence of `AVAudioPCMBuffer`.

---

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)