> ## Documentation Index
> Fetch the complete documentation index at: https://daily-mb-reorg-api-reference-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# NVIDIA Riva

> Speech-to-text service implementation using NVIDIA Riva

## Overview

NVIDIA Riva provides two STT service implementations:

* **`NvidiaSTTService`** -- Real-time streaming transcription using Parakeet models with interim results and continuous audio processing.
* **`NvidiaSegmentedSTTService`** -- Segmented transcription using Canary models with advanced language support, word boosting, and enterprise-grade accuracy.

<CardGroup cols={2}>
  <Card title="NVIDIA Riva STT API Reference" icon="code" href="https://reference-server.pipecat.ai/en/latest/api/pipecat.services.riva.stt.html">
    Pipecat's API methods for NVIDIA Riva STT integration
  </Card>

  <Card title="Example Implementation" icon="play" href="https://github.com/pipecat-ai/pipecat/blob/main/examples/voice/voice-nvidia.py">
    Complete example with NVIDIA services integration
  </Card>

  <Card title="NVIDIA Riva Documentation" icon="book" href="https://docs.nvidia.com/deeplearning/riva/user-guide/docs/asr/asr-overview.html">
    Official NVIDIA Riva ASR documentation
  </Card>

  <Card title="NVIDIA Developer Portal" icon="microphone" href="https://developer.nvidia.com">
    Access API keys and Riva services
  </Card>
</CardGroup>

## Installation

To use NVIDIA Riva services, install the required dependency:

```bash theme={null}
pip install "pipecat-ai[nvidia]"
```

## Prerequisites

### NVIDIA Riva Setup

Before using NVIDIA Riva STT services, you need:

1. **NVIDIA Developer Account**: Sign up at [NVIDIA Developer Portal](https://developer.nvidia.com)
2. **API Key**: Generate an NVIDIA API key for Riva services
3. **Model Selection**: Choose between Parakeet (streaming) and Canary (segmented) models

### Required Environment Variables

* `NVIDIA_API_KEY`: Your NVIDIA API key for authentication

## NvidiaSTTService

Real-time streaming transcription using NVIDIA Riva's Parakeet models.

<ParamField path="api_key" type="str" required>
  NVIDIA API key for authentication.
</ParamField>

<ParamField path="server" type="str" default="grpc.nvcf.nvidia.com:443">
  NVIDIA Riva server address.
</ParamField>

<ParamField path="model_function_map" type="Mapping[str, str]" default="{&#x22;function_id&#x22;: &#x22;1598d209-5e27-4d3c-8079-4751568b1081&#x22;, &#x22;model_name&#x22;: &#x22;parakeet-ctc-1.1b-asr&#x22;}">
  Mapping containing `function_id` and `model_name` for the ASR model.
</ParamField>

<ParamField path="sample_rate" type="int" default="None">
  Audio sample rate in Hz. When `None`, uses the pipeline's configured sample
  rate.
</ParamField>

<ParamField path="params" type="NvidiaSTTService.InputParams" default="None" deprecated>
  Additional configuration parameters. *Deprecated in v0.0.105. Use
  `settings=NvidiaSTTService.Settings(...)` instead.*
</ParamField>

<ParamField path="settings" type="NvidiaSTTService.Settings" default="None">
  Runtime-configurable settings. See [Settings](#settings) below.
</ParamField>

<ParamField path="use_ssl" type="bool" default="True">
  Whether to use SSL for the gRPC connection.
</ParamField>

<ParamField path="ttfs_p99_latency" type="float" default="1.0">
  P99 latency from speech end to final transcript in seconds. Override for your
  deployment. See [stt-benchmark](https://github.com/pipecat-ai/stt-benchmark).
</ParamField>

### Settings

Runtime-configurable settings passed via the `settings` constructor argument using `NvidiaSTTService.Settings(...)`. These can be updated mid-conversation with `STTUpdateSettingsFrame`. See [Service Settings](/pipecat/fundamentals/service-settings) for details.

| Parameter  | Type              | Default          | Description                                                              |
| ---------- | ----------------- | ---------------- | ------------------------------------------------------------------------ |
| `model`    | `str`             | `None`           | STT model identifier. *(Inherited from base STT settings.)*              |
| `language` | `Language \| str` | `Language.EN_US` | Target language for transcription. *(Inherited from base STT settings.)* |

### Usage

```python theme={null}
from pipecat.services.nvidia.stt import NvidiaSTTService

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

### Notes

* **Model cannot be changed after initialization**: Use the `model_function_map` parameter in the constructor to specify the model and function ID.
* **Streaming**: Provides real-time interim and final results through continuous audio streaming.

## NvidiaSegmentedSTTService

Batch/segmented transcription using NVIDIA Riva's Canary models. Processes complete audio segments after VAD detects speech boundaries.

<ParamField path="api_key" type="str" required>
  NVIDIA API key for authentication.
</ParamField>

<ParamField path="server" type="str" default="grpc.nvcf.nvidia.com:443">
  NVIDIA Riva server address.
</ParamField>

<ParamField path="model_function_map" type="Mapping[str, str]" default="{&#x22;function_id&#x22;: &#x22;ee8dc628-76de-4acc-8595-1836e7e857bd&#x22;, &#x22;model_name&#x22;: &#x22;canary-1b-asr&#x22;}">
  Mapping containing `function_id` and `model_name` for the ASR model.
</ParamField>

<ParamField path="sample_rate" type="int" default="None">
  Audio sample rate in Hz. When `None`, uses the pipeline's configured sample
  rate.
</ParamField>

<ParamField path="params" type="NvidiaSegmentedSTTService.InputParams" default="None" deprecated>
  Additional configuration parameters. *Deprecated in v0.0.105. Use
  `settings=NvidiaSegmentedSTTService.Settings(...)` instead.*
</ParamField>

<ParamField path="settings" type="NvidiaSegmentedSTTService.Settings" default="None">
  Runtime-configurable settings. See [Settings](#settings-2) below.
</ParamField>

<ParamField path="use_ssl" type="bool" default="True">
  Whether to use SSL for the gRPC connection.
</ParamField>

<ParamField path="ttfs_p99_latency" type="float" default="1.0">
  P99 latency from speech end to final transcript in seconds. Override for your
  deployment. See [stt-benchmark](https://github.com/pipecat-ai/stt-benchmark).
</ParamField>

### Settings

Runtime-configurable settings passed via the `settings` constructor argument using `NvidiaSegmentedSTTService.Settings(...)`. These can be updated mid-conversation with `STTUpdateSettingsFrame`. See [Service Settings](/pipecat/fundamentals/service-settings) for details.

| Parameter               | Type              | Default          | Description                                                              |
| ----------------------- | ----------------- | ---------------- | ------------------------------------------------------------------------ |
| `model`                 | `str`             | `None`           | STT model identifier. *(Inherited from base STT settings.)*              |
| `language`              | `Language \| str` | `Language.EN_US` | Target language for transcription. *(Inherited from base STT settings.)* |
| `profanity_filter`      | `bool`            | `False`          | Whether to filter profanity from results.                                |
| `automatic_punctuation` | `bool`            | `True`           | Whether to add automatic punctuation.                                    |
| `verbatim_transcripts`  | `bool`            | `False`          | Whether to return verbatim transcripts.                                  |
| `boosted_lm_words`      | `list[str]`       | `None`           | List of words to boost in the language model.                            |
| `boosted_lm_score`      | `float`           | `4.0`            | Score boost for specified words.                                         |

### Usage

```python theme={null}
from pipecat.services.nvidia.stt import NvidiaSegmentedSTTService
from pipecat.transcriptions.language import Language

stt = NvidiaSegmentedSTTService(
    api_key=os.getenv("NVIDIA_API_KEY"),
    settings=NvidiaSegmentedSTTService.Settings(
        language=Language.ES,
        automatic_punctuation=True,
        boosted_lm_words=["Pipecat", "NVIDIA"],
        boosted_lm_score=6.0,
    ),
)
```

### Notes

* **Model cannot be changed after initialization**: Use the `model_function_map` parameter in the constructor to specify the model and function ID.
* **Segmented processing**: Processes complete audio segments for higher accuracy compared to streaming.
* **Language support**: Supports Arabic, English (US/GB), French, German, Hindi, Italian, Japanese, Korean, Portuguese (BR), Russian, and Spanish (ES/US).
* **Word boosting**: Use `boosted_lm_words` and `boosted_lm_score` to improve recognition of domain-specific terms.

<Tip>
  The `InputParams` / `params=` pattern is deprecated as of v0.0.105. Use
  `Settings` / `settings=` instead. See the [Service Settings
  guide](/pipecat/fundamentals/service-settings) for migration details.
</Tip>
