Method Detect
Detect(WaveFile, CancellationToken)
Detects the speech regions of the given audio.
public IReadOnlyList<VoiceActivityDetector.Segment> Detect(WaveFile audio, CancellationToken cancellationToken = default)
Parameters
audioWaveFileThe audio to analyze. Multi-channel and non-16 kHz audio is converted internally.
cancellationTokenCancellationTokenA token observed while the samples are prepared.
Returns
- IReadOnlyList<VoiceActivityDetector.Segment>
The detected speech segments in chronological order, or an empty list when the audio contains no voice activity.
Exceptions
- ArgumentNullException
audioisnull.- ObjectDisposedException
The detector has been disposed.
- InvalidOperationException
The native detection pass failed.