Silero VAD Speech-State Reporting#

The pack already contains Silero VAD v6.2 at:

data/nvigi.models/nvigi.plugin.asr.nemotron-ggml/
  {8A5C059F-EDCA-49D1-875D-4F6CF208E5CE}/
    silero.gguf
    nvigi.model.config.json

The model is already staged; no download step is required. Its language metadata is multi. Ship this GUID directory only when VAD is enabled for a streaming Nemotron model.

1. Discover support#

After loading a backend, query ASRNemotronGGMLCapabilitiesAndRequirements. Enable VAD only when the returned structure version exposes the VAD fields, supportsSpeechState is true, and supportedVADModelGUIDs contains nvigi::kASRSileroVADModelGUID.

nvigi::ASRNemotronGGMLCapabilitiesAndRequirements* caps{};
nvigi::Result result = nvigi::getCapsAndRequirements(asr, create, &caps);

bool vadAvailable = false;
if (result == nvigi::kResultOk && caps && caps->common &&
    caps->getVersion() >= nvigi::kStructVersion2 &&
    caps->supportsSpeechState && caps->supportedVADModelGUIDs) {
    for (uint32_t i = 0; i < caps->supportedVADModelCount; ++i) {
        const char* guid = caps->supportedVADModelGUIDs[i];
        if (guid && std::strcmp(guid, nvigi::kASRSileroVADModelGUID) == 0) {
            vadAvailable = true;
            break;
        }
    }
}

This example uses std::strcmp from <cstring>. Do not read the VAD fields from a capability structure older than version 2, and do not treat an unrelated advertised VAD GUID as Silero support.

Silero is supported with the shipped CPU, CUDA, D3D12, and Vulkan Nemotron backends. It is an optional companion, not an ordinary ASR model selection.

2. Create the streaming instance#

Chain VAD creation parameters onto the Nemotron creation chain. A null modelGUID selects the shipped Silero constant.

nvigi::ASRNemotronGGMLCreationParameters create{};
create.chain(common);

nvigi::ASRNemotronGGMLVADCreationParameters vadCreate{};
vadCreate.modelGUID = nullptr; // kASRSileroVADModelGUID
create.chain(vadCreate);

nvigi::Result result = asr->createInstance(create, &instance);

3. Configure VAD at stream Start#

nvigi::ASRNemotronGGMLRuntimeParameters runtime{};
runtime.chain(streaming);

nvigi::ASRNemotronGGMLVADRuntimeParameters vad{};
vad.mode = nvigi::ASRVADMode::eReportSpeechState;
vad.speechStartThreshold = 0.60f;
vad.speechEndThreshold = 0.40f;
vad.minSpeechDurationMs = 100;
vad.minSilenceDurationMs = 500;
runtime.chain(vad);

The plugin validates:

  • mode is eDisabled or eReportSpeechState;

  • both thresholds are finite and in [0, 1];

  • speechEndThreshold does not exceed speechStartThreshold;

  • both debounce durations are from 1 through 60000 ms.

VAD settings are captured at Start. Changing them during an active stream is invalid; change them between streams.

4. Read speech-state output#

const nvigi::InferenceDataASRSpeechState* speech{};
if (ctx->outputs->findAndValidateSlot(
        nvigi::kASRDataSlotSpeechState, &speech) && speech) {
    nvigi::ASRSpeechState state = speech->state;
    float probability = speech->speechProbability;
    uint64_t samplesSeen = speech->processedAudioSamples;
}

Field

Meaning

state

eUnknown, eSilence, or eSpeech after debounce logic

speechProbability

Current Silero speech probability

processedAudioSamples

Cumulative number of audio samples processed by VAD

VAD reports metadata alongside normal ASR results. It never drops or gates input, removes text, resets decoder state, inserts a silence token into text, or sends Stop on the application’s behalf. The application must continue the normal Start/Data/Stop lifecycle and decide how to use the metadata.

See the Programming Guide for the complete streaming contract and Samples for --vad.