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

# prepareToAnalyze(in:withProgressReadyHandler:)

Prepares the analyzer to begin work with minimal startup delay, reporting the progress of that preparation.

## Declaration

```swift
final func prepareToAnalyze(in audioFormat: AVAudioFormat?, withProgressReadyHandler progressReadyHandler: sending ((Progress) -> Void)?) 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.
- `progressReadyHandler`: A closure that this method calls when progress reporting becomes available. The closure takes the following parameter:

## See Also

### Improving responsiveness

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