init(inputSequence:modules:options:analysisContext:volatileRangeChangedHandler:)
Creates an analyzer and begins analysis.
Declaration
convenience init<InputSequence>(inputSequence: InputSequence, modules: [any SpeechModule], options: SpeechAnalyzer.Options? = nil, analysisContext: AnalysisContext = .init(), volatileRangeChangedHandler: sending ((CMTimeRange, Bool, Bool) -> Void)? = nil) where InputSequence : Sendable, InputSequence : AsyncSequence, InputSequence.Element == AnalyzerInputParameters
- inputSequence:
An asynchronous sequence of audio inputs to analyze. Analysis will begin when the first audio input is added to the sequence.
- modules:
An initial list of modules that will analyze the audio.
- options:
A structure specifying analysis options.
- analysisContext:
An object containing contextual information to improve or inform the analysis.
- volatileRangeChangedHandler:
A closure called to report the analysis’ progress. The closure takes the following parameters:
- range
The current volatile range.
- changedStart
If
true, the volatile range contains an updated start time. This indicates that prior results have been finalized.- changedEnd
If
true, the volatile range contains an update end time. This indicates that analysis of that time has started.