Getting Started with RIVA ASR Plugin Pack#

This guide gets you from a freshly-extracted pack to a transcribed sentence in three steps: prerequisites, run a sample, then integrate into your application. For an overview of what’s in the pack and what the plugin can do, see the Developer Pack Overview. For the full API and per-backend behavior, see the Programming Guide.

1. Prerequisites#

  • Hardware

    • GPU backends: any reasonably modern discrete GPU (NVIDIA, AMD, Intel)

    • CUDA backend: NVIDIA GPU with up-to-date driver

    • System memory: 8 GB+

    • VRAM: ~1.5 GB recommended for GPU backends (model is ~1.2 GB resident)

  • OS: Windows 10 20H1 (build 19041) or newer

  • Driver

    • CUDA backend: any NVIDIA driver supporting the CUDA 12 runtime. GPU inference scheduling priority (SetGpuInferenceSchedulingMode on CUDA + CIG) requires R575 or newer; on older drivers the call is silently ignored and transcription still works.

    • D3D12 backend: any WDDM 2.0+ driver

    • Vulkan backend: any Vulkan 1.2+ driver

  • Development (only required to rebuild samples): Visual Studio 2022 with Windows SDK 10.0.19041+


2. Run Your First ASR Sample#

The pack ships two pre-built samples in bin/x64/. Run either to confirm the install works.

2.1 Command-line sample (nvigi.asr.sample)#

cd bin\x64
.\nvigi.asr.sample.exe -m ..\..\data\nvigi.models -b cuda -w ..\..\data\nvigi.test\nvigi.asr\jfk.wav

This loads the CUDA backend, loads the Parakeet-TDT v2 model (default), transcribes the WAV file offline, and prints the result with timing.

jfk.wav ships at <PACK_ROOT>/data/nvigi.test/nvigi.asr/jfk.wav as a ready-to-run English sample (16 kHz, 16-bit PCM, mono). For your own audio, the same format is required.

Omit -w to capture from the default microphone instead (press Enter to start, Enter again to stop).

To switch backend, change -b to cpu, vk, or d3d12. To use the multilingual model, add --model parakeet-v3.

Full CLI reference: see Samples section 3.

2.2 3D interactive sample (nvigi.3d)#

cd bin\x64
.\nvigi.3d.exe

Use the on-screen panel to record audio and view the transcription. Backend (CUDA / Vulkan / D3D12 / CPU) and model (v2 / v3) are switchable from the Options… popup.

Full UI walkthrough and command-line options: see Samples section 2.


3. Integrate into Your Application#

3.1 Choose a backend#

Pick the DLL you will ship and load at runtime based on the target hardware and the graphics API your application is built on:

  • CUDA (nvigi.plugin.asr.riva-ggml.cuda.dll) — NVIDIA-only. Fastest path on NVIDIA hardware; supports CUDA-in-Graphics (CIG) for sharing the GPU with a D3D12 or Vulkan renderer.

  • D3D12 (nvigi.plugin.asr.riva-ggml.d3d12.dll) — cross-vendor GPU path for D3D12-based applications and games.

  • Vulkan (nvigi.plugin.asr.riva-ggml.vk.dll) — cross-vendor GPU path for Vulkan-based applications and games.

  • CPU (nvigi.plugin.asr.riva-ggml.cpu.dll) — no GPU required. Suitable for headless tools, test rigs, and systems without adequate VRAM.

There is no in-process fallback between backends. To support multiple hardware configurations, ship more than one backend DLL and select at startup based on detected capability. The 3D sample’s SelectAutoPlugin (see Samples) is a working reference for such selection logic.

3.2 Minimum integration#

The ASR API is declared in two headers; include both:

#include <nvigi.h>              // Preferences, InferenceInstance, InferenceExecutionContext,
                                // CommonCreationParameters, …
#include "nvigi_asr_riva.h"     // IAutoSpeechRecognition, ASRRivaGGMLCreationParameters,
                                // ASRGGMLBackend, kASRDataSlotAudio, kASRDataSlotTranscribedText

Once NVIGI has been initialized and nvigiLoadInterface has been resolved (see Programming Guide sections 1.0-2.0), load the ASR interface, create an instance, and run inference:

nvigi::IAutoSpeechRecognition* iasr{};
if (NVIGI_FAILED(result, nvigiGetInterfaceDynamic(
        nvigi::plugin::asr::riva_ggml::cuda::kId, &iasr, nvigiLoadInterface)))
{
    // Handle error here
}

nvigi::CommonCreationParameters common{};
common.utf8PathToModels = modelsDir;
common.modelGUID        = "{163BD6DC-248D-4238-BC9B-B76D2AB1C3DD}"; // Parakeet-TDT v2 (English)

nvigi::ASRRivaGGMLCreationParameters p{};
p.chain(common);
p.backend = nvigi::ASRGGMLBackend::eCUDA;

nvigi::InferenceInstance* inst{};
iasr->createInstance(p, &inst);
// Feed 16 kHz / 16-bit / mono PCM audio into kASRDataSlotAudio and
// read kASRDataSlotTranscribedText from the callback.
iasr->destroyInstance(inst);

The full init → load → evaluate → cleanup walkthrough is in the Programming Guide, sections 1.0–9.0. For an end-to-end working reference, read source/samples/nvigi.asr.sample/sample_asr.cpp.

3.3 Features this plugin does not expose#

The following are not supported in this release: streaming mode (offline-only; send complete audio buffers), word boosting, language-model / beam-search decoding, and separate punctuation models (the TDT models emit punctuation natively where present in training data). No stub APIs are provided for these — the corresponding fields are absent from ASRRivaGGMLCreationParameters and ASRRivaGGMLRuntimeParameters.

3.4 Further reading#