WebRTCVad<T>

Models & Types · AiDotNet.Audio.VoiceActivity

Neural WebRTC VAD model for low-latency voice activity detection.

Inheritance: NeuralNetworkBase<T> → AudioNeuralNetworkBase<T> → WebRTCVad<T>

Implements: IVoiceActivityDetector<T>

For Beginners

WebRTC VAD is a very fast “is someone talking?” detector used in video calls and voice chat. It processes tiny chunks of audio (10-30 milliseconds) and instantly decides if speech is present.

Usage:

How It Works

WebRTC VAD is a lightweight voice activity detection model inspired by the GMM-based detector in the WebRTC framework but reimplemented as a neural network for improved accuracy. It operates at very low latency (10-30ms frames) and is designed for real-time communication.

Constructors

Constructor Summary
WebRTCVad(NeuralNetworkArchitecture<T> architecture, WebRTCVadOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) Creates a WebRTC VAD model in native training mode.
WebRTCVad(NeuralNetworkArchitecture<T> architecture, string modelPath, WebRTCVadOptions options) Creates a WebRTC VAD model in native training mode.

Properties

Property Summary
double Threshold { get; set; }
int FrameSize { get; }
int MinSilenceDurationMs { get; set; }
int MinSpeechDurationMs { get; set; }

Methods

Method Summary
IReadOnlyList<ValueTuple<int, int>> DetectSpeechSegments(Tensor<T> audio)
ModelMetadata<T> GetModelMetadata()
T GetSpeechProbability(Tensor<T> audioFrame)
T[] GetFrameProbabilities(Tensor<T> audio)
ValueTuple<bool, T> ProcessChunk(Tensor<T> audioChunk)
bool DetectSpeech(Tensor<T> audioFrame)