<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Speech",
  "identifier" : "/documentation/Speech/AnalyzerInput/init(buffer:)-3nt02",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Speech"
    ],
    "preciseIdentifier" : "s:6Speech13AnalyzerInputV6bufferAC9CoreMedia19CMReadySampleBufferVyAE019CMReadOnlyDataBlockI0VG_tcfc"
  },
  "title" : "init(buffer:)"
}
-->

# init(buffer:)

Creates an audio input object.

```
init(buffer: CMReadySampleBuffer<CMReadOnlyDataBlockBuffer>)
```

## Parameters

`buffer`

An audio buffer.

## Discussion

The audio buffer must not overlap or precede other audio input, as determined by the buffer’s `presentationTimeStamp` value.

> Tip: To convert a `CMSampleBuffer` to a `CMReadySampleBuffer`, use `CMReadySampleBuffer(unsafeWithDataBuffer:)`. You should not alter the original `CMSampleBuffer` after passing it to that initializer.

---

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)