Overview
NvidiaTTSService provides high-quality text-to-speech synthesis through NVIDIA Riva’s cloud-based AI models accessible via gRPC API. The service offers multilingual support, configurable quality settings, and streaming audio generation optimized for real-time applications.
NVIDIA Riva TTS API Reference
Pipecat’s API methods for NVIDIA Riva TTS integration
Example Implementation
Complete example with Riva NIM
NVIDIA Riva Documentation
Official NVIDIA Riva TTS documentation
NVIDIA Developer Portal
Access API keys and Riva services
Installation
To use NVIDIA Riva services, install the required dependencies:Prerequisites
NVIDIA Riva Setup
Before using Riva TTS services, you need:- NVIDIA Developer Account: Sign up at NVIDIA Developer Portal
- API Key: Generate an NVIDIA API key for Riva services
- Riva Access: Ensure access to NVIDIA Riva TTS services
Required Environment Variables
NVIDIA_API_KEY: Your NVIDIA API key for authentication
Configuration
NvidiaTTSService
NVIDIA API key for authentication.
gRPC server endpoint.
Voice model identifier.
Audio sample rate in Hz. When
None, uses the pipeline’s configured sample rate.Dictionary containing
function_id and model_name for the TTS model.Whether to use SSL for the NVIDIA Riva server connection.
Runtime-configurable synthesis settings. See InputParams below.
InputParams
| Parameter | Type | Default | Description |
|---|---|---|---|
language | Language | Language.EN_US | Language code for synthesis. |
quality | int | 20 | Audio quality setting (0-100). |
Usage
Basic Setup
With Custom Voice and Quality
Notes
- gRPC-based: NVIDIA Riva uses gRPC (not HTTP or WebSocket) for communication with the TTS service.
- Model cannot be changed after initialization: The model and function ID must be set during construction via
model_function_map. Callingset_model()after initialization will log a warning and have no effect. - SSL enabled by default: The service connects to NVIDIA’s cloud endpoint with SSL. Set
use_ssl=Falseonly for local or custom Riva deployments. - Blocking gRPC calls: Audio generation uses
asyncio.to_threadto avoid blocking the event loop, since the underlying Riva client uses synchronous gRPC calls.