<!--
{
  "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/AnalyzerInputConverter/convert(_:at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Speech"
    ],
    "preciseIdentifier" : "s:6Speech22AnalyzerInputConverterC7convert_2atSayAA0bC0VGSo13AVAudioBufferC_So0G4TimeCSgtKF"
  },
  "title" : "convert(_:at:)"
}
-->

# convert(_:at:)

Converts an audio buffer.

```
final func convert(_ buffer: AVAudioBuffer, at audioTime: AVAudioTime?) throws -> [AnalyzerInput]
```

## Parameters

`buffer`

An audio buffer to convert. Do not reuse or modify this buffer; it may be retained across calls.

`audioTime`

The time-code of the start of the audio buffer. If `nil`, the audio buffer is assumed to start immediately after the previous buffer (or at time-code zero if there is no previous buffer).

## Return Value

An array of `AnalyzerInput` objects containing converted audio corresponding to some or all of the audio buffer.

## Discussion

This method does not necessarily convert the entire audio buffer. Some audio data may be held over and integrated into the conversion of a later audio buffer for correctness or efficiency.

Call [`flush()`](/documentation/Speech/AnalyzerInputConverter/flush()) to convert any remaining held-over audio and add it to the analyzer’s input sequence before finishing the sequence.

---

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)