WebRtcVad.NET 1.0.0

dotnet add package WebRtcVad.NET --version 1.0.0
                    
NuGet\Install-Package WebRtcVad.NET -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WebRtcVad.NET" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WebRtcVad.NET" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="WebRtcVad.NET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WebRtcVad.NET --version 1.0.0
                    
#r "nuget: WebRtcVad.NET, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package WebRtcVad.NET@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=WebRtcVad.NET&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=WebRtcVad.NET&version=1.0.0
                    
Install as a Cake Tool

WebRtcVad.NET

Pure managed C# port of WebRTC's voice activity detection (VAD) algorithm.

No native dependencies - works on any platform that supports .NET 8+.

Build NuGet

Installation

dotnet add package WebRtcVad.NET

Usage

using WebRtcVad.NET;

// Create a VAD instance
using var vad = new WebRtcVad
{
    SampleRate = SampleRate.Rate16kHz,
    FrameLength = FrameLength.Length20ms,
    OperatingMode = OperatingMode.Aggressive
};

// Check if audio frame contains speech
byte[] audioFrame = GetAudioFrame(); // 16-bit PCM, little-endian
bool hasSpeech = vad.HasSpeech(audioFrame);

// Or use Span<short> for better performance
Span<short> samples = GetAudioSamples();
bool hasSpeech = vad.HasSpeech(samples);

Configuration

Sample Rates

  • SampleRate.Rate8kHz
  • SampleRate.Rate16kHz
  • SampleRate.Rate32kHz
  • SampleRate.Rate48kHz

Frame Lengths

  • FrameLength.Length10ms
  • FrameLength.Length20ms
  • FrameLength.Length30ms

Operating Modes

Mode Description
Quality Least aggressive - best for clean audio
LowBitrate Slightly more aggressive
Aggressive For moderately noisy audio
VeryAggressive Most aggressive - for very noisy audio

Higher aggressiveness = fewer false positives (noise detected as speech) but more false negatives (missed speech).

Audio Format

This library only supports raw 16-bit linear PCM audio. It will not work with WAV files or other container formats directly - you need to extract the raw PCM data first.

Algorithm

This is a bit-exact port of the WebRTC VAD algorithm, which uses a Gaussian Mixture Model (GMM) to classify audio frames as speech or non-speech. The algorithm:

  1. Splits audio into 6 frequency bands
  2. Calculates energy features for each band
  3. Uses GMM to compute speech/noise probabilities
  4. Applies adaptive thresholds based on operating mode

License

MIT License - see LICENSE

The algorithm is ported from WebRTC, which is licensed under the WebRTC License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 101 1/9/2026