<!--
{
  "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/SpeechAnalyzer/prepareToAnalyze(in:withProgressReadyHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Speech"
    ],
    "preciseIdentifier" : "s:6Speech0A8AnalyzerC16prepareToAnalyze2in24withProgressReadyHandlerySo13AVAudioFormatCSg_ySo10NSProgressCcSgntYaKF"
  },
  "title" : "prepareToAnalyze(in:withProgressReadyHandler:)"
}
-->

# prepareToAnalyze(in:withProgressReadyHandler:)

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

```
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:

- progress: A `Progress` object that reports the progress of the preparation work.

---

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)