---
title: "prepareToAnalyze(in:)"
framework: speech
role: symbol
role_heading: Instance Method
path: "speech/speechanalyzer/preparetoanalyze(in:)"
---

# prepareToAnalyze(in:)

Prepares the analyzer to begin work with minimal startup delay.

## Declaration

```swift
final func prepareToAnalyze(in audioFormat: AVAudioFormat?) async throws
```

## Parameters

- `audioFormat`: An audio format describing the expected input. The analyzer will load assets appropriate for the given format. If nil or if the input is not in this format, the analyzer will reconfigure itself when it processes the actual audio.

## Discussion

Discussion The analyzer normally performs some configuration lazily as the first audio input becomes available. This method performs that work immediately to reduce or eliminate delays in analyzing the first audio input.

## See Also

### Improving responsiveness

- [prepareToAnalyze(in:withProgressReadyHandler:)](speech/speechanalyzer/preparetoanalyze(in:withprogressreadyhandler:).md)
