Skip to main content

NVIDIA NVIDIA Riva STT

The NvidiaSTTService provides state-of-the-art real-time speech-to-text capabilities using NVIDIA Riva's GPU-accelerated streaming ASR. For batch or segmented processing, Piopiy also offers NvidiaSegmentedSTTService.

Installation

To use NVIDIA Riva, install the required dependencies:

pip install "piopiy-ai[nvidia]"

Prerequisites

  • An NVIDIA account and API key (Get yours here).
  • Set your API key in your environment:
    export NVIDIA_API_KEY="your_api_key_here"

Configuration

NvidiaSTTService (Real-time) Parameters

ParameterTypeDefaultDescription
api_keystrRequiredYour NVIDIA API key.
serverstr"grpc.nvcf.nvidia.com:443"NVIDIA Riva server address.
model_function_mapdictSee defaultMap containing function_id and model_name.
use_sslboolTrueWhether to use SSL for the server connection.

Default model_function_map:

{
"function_id": "1598d209-5e27-4d3c-8079-4751568b1081",
"model_name": "parakeet-ctc-1.1b-asr"
}

NvidiaSegmentedSTTService (Batch) Parameters

ParameterTypeDefaultDescription
api_keystrRequiredYour NVIDIA API key.
serverstr"grpc.nvcf.nvidia.com:443"NVIDIA Riva server address.
model_function_mapdictSee defaultMap containing function_id and model_name.

Default model_function_map (Segmented):

{
"function_id": "ee8dc628-76de-4acc-8595-1836e7e857bd",
"model_name": "canary-1b-asr"
}

Usage

Real-time Transcription

import os
from piopiy.services.nvidia.stt import NvidiaSTTService

stt = NvidiaSTTService(
api_key=os.getenv("NVIDIA_API_KEY")
)

Segmented Transcription

import os
from piopiy.services.nvidia.stt import NvidiaSegmentedSTTService

stt = NvidiaSegmentedSTTService(
api_key=os.getenv("NVIDIA_API_KEY")
)

Notes

  • Language Support: Both services default to en-US but support a wide range of Languages.
  • GPU Acceleration: NVIDIA Riva is designed to run on NVIDIA hardware for unmatched transcription speed.
  • Deprecation Warning: RivaSTTService is deprecated in favor of NvidiaSTTService.