---
title: "setVolatileRangeChangedHandler(_:)"
framework: speech
role: symbol
role_heading: Instance Method
path: "speech/speechanalyzer/setvolatilerangechangedhandler(_:)"
---

# setVolatileRangeChangedHandler(_:)

A closure that the analyzer calls when the volatile range changes.

## Declaration

```swift
final func setVolatileRangeChangedHandler(_ handler: sending ((CMTimeRange, Bool, Bool) -> Void)?)
```

## Parameters

- `handler`: A closure called to report the analysis’ progress. The closure takes the following parameters:

## Discussion

Discussion You can use this handler to manage audio input resources and monitor progress. You can also use this handler to respond to result finalization, but the better tool for that job is the resultsFinalizationTime property of a module’s results. When the analyzer calls this handler, the application may not have consumed the result from the stream yet; this handler may be called with a new volatile range while there are still results prior to the new volatile range waiting to be consumed. This closure replaces any handler you specified when creating the analyzer.

## See Also

### Monitoring analysis

- [volatileRange](speech/speechanalyzer/volatilerange.md)
