Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions livekit-agents/livekit/agents/stt/stt.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES.
# SPDX-License-Identifier: Apache-2.0

from __future__ import annotations

import asyncio
Expand Down Expand Up @@ -235,7 +238,7 @@ async def recognize(

except APIError as e:
retry_interval = conn_options._interval_for_retry(i)
if conn_options.max_retry == 0:
if conn_options.max_retry == 0 or not e.retryable:
self._emit_error(e, recoverable=False)
raise
elif i == conn_options.max_retry:
Expand Down Expand Up @@ -465,7 +468,7 @@ async def _main_task(self) -> None:
last_start_time = time.time()
return await self._run()
except APIError as e:
if max_retries == 0:
if max_retries == 0 or not e.retryable:
self._emit_error(e, recoverable=False)
raise
elif self._num_retries == max_retries:
Expand Down
36 changes: 32 additions & 4 deletions livekit-plugins/livekit-plugins-nvidia/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# NVIDIA plugin for LiveKit Agents
<!-- SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. -->
<!-- SPDX-License-Identifier: Apache-2.0 -->

Support for [NVIDIA Riva](https://developer.nvidia.com/riva)'s speech AI services in LiveKit Agents.
# NVIDIA plugin for LiveKit Agents

More information is available in the [NVIDIA Riva documentation](https://developer.nvidia.com/riva).
Support for NVIDIA Speech AI services in LiveKit Agents.

## Installation

Expand All @@ -15,4 +16,31 @@ pip install livekit-plugins-nvidia
You can either:

1. Use an API key from NVIDIA. It can be set as an environment variable: `NVIDIA_API_KEY`
2. Use you self hosted [Nim](https://developer.nvidia.com/nim) server.
2. Use your self-hosted [NIM](https://developer.nvidia.com/nim) server.

## Usage

```python
from livekit.plugins import nvidia

stt = nvidia.STT(
model="parakeet-1.1b-en-US-asr-streaming-silero-vad-sortformer",
inference_mode="streaming",
server="grpc.nvcf.nvidia.com:443",
use_ssl=True,
endpointing=nvidia.EndpointingConfig(mode="low_latency"),
)

tts = nvidia.TTS(
voice="Magpie-Multilingual.EN-US.Leo",
sample_rate=16000,
inference_mode="online",
)
```

STT defaults to `inference_mode="auto"`; use `"streaming"` or `"offline"` to
match the deployed model. TTS defaults to `"online"`; use `"offline"` for batch
models.

For local NVIDIA Speech deployments, pass the local `server` and set
`use_ssl=False` when TLS is not enabled.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES.
# SPDX-License-Identifier: Apache-2.0

# Copyright 2025 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -35,11 +38,19 @@ def __getattr__(name: str) -> typing.Any:
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")


from .stt import STT, SpeechStream # noqa: E402
from .stt import STT, EndpointingConfig, SpeechStream # noqa: E402
from .tts import TTS, SynthesizeStream # noqa: E402
from .version import __version__ # noqa: E402

__all__ = ["STT", "SpeechStream", "TTS", "SynthesizeStream", "realtime", "__version__"]
__all__ = [
"STT",
"EndpointingConfig",
"SpeechStream",
"TTS",
"SynthesizeStream",
"realtime",
"__version__",
]


from livekit.agents import Plugin # noqa: E402
Expand Down
Loading