Voice activity detection LibVAD makes it easy to detect in an audio stream when people are talking

What is LibVAD?


LibVAD is a voice activity detection algorithm that can be added into any existing application. The library is written in platform independent C code and allows you to detect in a real-time audio stream or in stored PCM audio when a user is talking.

An investment of $10,000 and nearly three weeks of development time. That is how long it takes an average developer to implement a good voice activity detection algorithm. Creating proper voice activity detection is a challenge - it is no quick or easy task. Integrating LibVAD can easily be done in less than 30 minutes, saving you time, money and a headache.

LibVAD allows you to focus on building great software instead of wasting time implementing specialised audio algorithms.

The library consists of a single header and a compiled library or source file for easy inclusion into your project.

Let us take a look at following code sample:

#include "vad.h" // Include the LibVAD header

// 1. Init the library
struct VADState* state = libvad_init();
if(state == NULL)
{
    printf("Error initialising LibVAD");
    return;
}
        
// 2. Pull blocks from a stream to the detection algorithm, and process
while(true /* Keep fetching audio data */)
{    
    // 3. Process PCM32 audio (PCM16 is also supported)
    float* audioBlock = .. assign (pointer to) data here. 
    int numSamples = .. assign number of samples here.

    state = libvad_processAudioPCM32(audioBlock, numSamples, state);
    
    // 4. Get the result of the processed audio block
    switch( libvad_getAudioState(state) )
    {
        case VAD_STATE_SILENT:
            printf("No audio..");
            break;
                
        case VAD_STATE_BROADCAST:
            printf("Speaking..");
            break;
    }    
}

//  5. Destroy and clean up the state object once we're done.
libvad_destroy(state);
                    

And we are done! That is all it takes to include voice activity detection in your application.

Platforms


Our customers


    Ventrilode

    Mumblefy