Table of Contents

Method Detect

Namespace
LMKit.Speech
Assembly
LM-Kit.NET.dll

Detect(WaveFile, CancellationToken)

Detects the speech regions of the given audio.

public IReadOnlyList<VoiceActivityDetector.Segment> Detect(WaveFile audio, CancellationToken cancellationToken = default)

Parameters

audio WaveFile

The audio to analyze. Multi-channel and non-16 kHz audio is converted internally.

cancellationToken CancellationToken

A 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

audio is null.

ObjectDisposedException

The detector has been disposed.

InvalidOperationException

The native detection pass failed.

Share