Skip to content

WebRtcVad

Jay Miller edited this page May 18, 2020 · 3 revisions

WebRtcVad type

Namespace

WebRtcVadSharp

Summary

A .NET adapter for WebRTC's voice activity detection library.

Remarks

Because the underlying WebRTC library has robust (and fast) error checking of its own, this class primarily validates input arguments the raw WebRTC calls have failed to provide specific information about what went wrong. This approach avoids costly enum conversions/validations until a failure state obtains, at which point performance presumably doesn't matter.

Constructors

Constructor Description
WebRtcVad() Creates and initializes a WebRTC voice activity detector.
WebRtcVad(IWebRtcDll) Creates and initializes a WebRTC voice activity detector.

Properties

Property Description
FrameLength Gets or sets the frame length when using the audio-only HasSpeech(byte[]) overload. Defaults to Is10ms.
OperatingMode Gets or sets the aggressiveness of the detection. Defaults to HighQuality.
SampleRate Gets or sets the sample rate when using the audio-only HasSpeech(byte[]) overload. Defaults to Is8kHz.

Methods

Method Description
Dispose() Dispose the underlying WebRTC resources.
HasSpeech(byte[]) Test whether the supplied frame contains speech.
HasSpeech(byte[],SampleRate,FrameLength) Test whether the supplied frame contains speech.