Use when the user wants to deploy, run, or test an ASR (speech-to-text) Riva NIM — cloud-hosted (build.nvidia.com) or self-hosted Parakeet/Canary/Whisper.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Use when the user wants to deploy, run, or test an ASR (speech-to-text) Riva NIM — cloud-hosted (build.nvidia.com) or self-hosted Parakeet/Canary/Whisper.
Agent: When walking the user through a multi-step workflow, announce each step before presenting it: Step N/M — Step Title (e.g., "Step 1/4 — Set Model Variables").
Purpose
Deploy and run NVIDIA Riva ASR (speech-to-text) NIMs. Supports cloud-hosted
inference via build.nvidia.com (no GPU required) and self-hosted deployment on
your own GPU using Docker. Covers streaming and offline transcription, word
boosting, and performance benchmarking.
Workflow
Choose Option A (cloud) for quick testing without a GPU, or Option B (self-hosted) for production. Self-hosted follows a 4-step process: set model variables → run container → verify health → run inference.
Prerequisites
Complete riva-nim-setup before self-hosted deployment: NVIDIA Container Toolkit, NGC_API_KEY exported, Docker logged in to nvcr.io
Cloud-hosted inference: and a valid
pip install -U nvidia-riva-client
NVIDIA_API_KEY
Not sure which model to use? Run riva-model-selection first
Instructions
Pick a path: cloud inference (Option A) or self-hosted NIM (Option B).
For cloud inference (Option A): install nvidia-riva-client, set NVIDIA_API_KEY, pick a function ID, run transcribe_file.py (streaming) or transcribe_file_offline.py (offline) against grpc.nvcf.nvidia.com:443 with --use-ssl.
For self-hosted (Option B): look up CONTAINER_ID and NIM_TAGS_SELECTOR from the ASR support matrix, mount a model cache dir with chmod 700, then follow Steps 1–4 below (set vars, run container, verify readiness, run inference).
Option A — Cloud-Hosted Inference (build.nvidia.com)
Prebuilt vs RMIR: The NIM auto-detects your GPU on startup. For well-known GPUs (A100, H100, select Blackwell), it pulls a prebuilt model repo — a tarball of TensorRT engines already compiled for that GPU via riva-build + riva-deploy. For unsupported GPUs, it falls back to RMIR (Riva Model Intermediate Representation), which is a portable format that gets compiled into TensorRT engines on your local GPU at first run (slower startup, same runtime performance). You rarely need to set model_type explicitly — omit it and the NIM picks the right one automatically.
Omit -v $LOCAL_NIM_CACHE:/opt/nim/.cache to skip caching (re-downloads model on every run).
Security note:NGC_API_KEY passed via -e NGC_API_KEY inherits from the shell environment. For production, use Docker secrets or a secrets manager instead of env vars; avoid storing API keys in shell history or plaintext config files.
Boost score ranges: CTC: 20–100 (negative scores discourage words) | RNNT/TDT: 0.5–2.0 (single score for all words, no negatives, no OOV).
Token Boosting (CTC only)
Maps the tokens the model predicts to the word you want. Use when word boosting alone can't overcome the acoustic model (e.g. multi-syllable OOV terms).
Step 1 — Get the model tokenizer from the running container:
Step 2 — Generate token mapping with SentencePiece:
import sentencepiece as spm
s = spm.SentencePieceProcessor(model_file='/tmp/tokenizer.model')
word_asr_predicts = "ablooper"# what the model currently outputs
word_asr_should_predict = "Abloopar"# what you want
tokens = s.encode(word_asr_predicts, out_type=str)
print(word_asr_should_predict + ':' + '/'.join(tokens))
# e.g. Abloopar:▁a/b/lo/op/er
Important: Always use the actual model tokenizer from inside the container — test tokenizers generate different token sequences and the mapping will silently fail.
Performance Benchmarking (Self-Hosted)
Use riva_streaming_asr_client — a pre-built binary available in PATH inside the NIM container. Do not use the Python script from python-clients; run the binary via docker exec.
A sample LibriSpeech wav file is bundled at /opt/riva/examples/asr_lib/1272-135031-0000.wav inside the container.
Streaming Models
Run at increasing concurrency levels (1, 2, 4, 8, …). Set num_iterations to 3× num_parallel_requests for stable results.