<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Speech",
  "identifier" : "/documentation/Speech/AnalyzerInput",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Speech"
    ],
    "preciseIdentifier" : "s:6Speech13AnalyzerInputV"
  },
  "title" : "AnalyzerInput"
}
-->

# AnalyzerInput

Time-coded audio data.

```
struct AnalyzerInput
```

## Overview

The audio data must have an audio format that is supported by the analyzer’s modules; the analyzer does not perform audio conversion. Call [`bestAvailableAudioFormat(compatibleWith:considering:)`](/documentation/Speech/SpeechAnalyzer/bestAvailableAudioFormat(compatibleWith:considering:)) (or its variants) to select an appropriate format to convert to.

The audio format may differ from one `AnalyzerInput` object to the next. If the new audio format is supported by the modules, the modules will be reconfigured as needed.

## Topics

### Creating an input element

[`init(buffer: CMReadySampleBuffer<CMReadOnlyDataBlockBuffer>)`](/documentation/Speech/AnalyzerInput/init(buffer:)-3nt02)

Creates an audio input object.

[`init(buffer: AVAudioPCMBuffer)`](/documentation/Speech/AnalyzerInput/init(buffer:)-2ysg3)

Creates an audio input object.

[`init(buffer: AVAudioPCMBuffer, bufferStartTime: CMTime?)`](/documentation/Speech/AnalyzerInput/init(buffer:bufferStartTime:))

Creates an audio input object for audio that may be discontiguous with previous input.

### Inspecting an input element

[`let bufferStartTime: CMTime?`](/documentation/Speech/AnalyzerInput/bufferStartTime)

The time-code of this input.

[`let bufferDuration: CMTime`](/documentation/Speech/AnalyzerInput/bufferDuration)

The length of this input.

[`let bufferFormat: AVAudioFormat`](/documentation/Speech/AnalyzerInput/bufferFormat)

The audio format of this input.

[`var buffer: AVAudioPCMBuffer`](/documentation/Speech/AnalyzerInput/buffer)

A new copy of the audio data for this input.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)