Skip to navigation

nemo_voice_agent.pipecat.services.nvidia

View as Markdown

Local extensions to pipecat’s NVIDIA (Riva / NVCF) services.

Submodules

Package Contents

Classes

NameDescription
ResilientNvidiaTTSServiceNvidiaTTSService that retries a synthesis stream that never produced audio.

API

class nemo_voice_agent.pipecat.services.nvidia.tts.ResilientNvidiaTTSService(
max_retries: int = 2,
retry_backoff_secs: float = 0.25,
kwargs = {}
)

Bases: NvidiaTTSService

NvidiaTTSService that retries a synthesis stream that never produced audio.

Parameters:

max_retries
int" default="2

Additional attempts after the first failure. 0 restores upstream behaviour exactly.

retry_backoff_secs
float" default="0.25

Base delay between attempts; doubled each retry.

**kwargs
Defaults to {}

Forwarded to NvidiaTTSService.

_max_retries
= max(0, int(max_retries))
_retry_backoff_secs
= max(0.0, float(retry_backoff_secs))
nemo_voice_agent.pipecat.services.nvidia.tts.ResilientNvidiaTTSService._synthesis_handler(
state
) -> None

Run the SynthesizeOnline stream, retrying establishment failures.

Overrides upstream’s single-shot handler. Same contract: forward each response onto state.response_queue, push the exception on failure, and always terminate with a None sentinel so _process_responses can finish.

Retry is deliberately restricted to attempts that produced no audio. Once any frame has reached the audio context, re-running the request would splice a duplicate prefix into the middle of an utterance, which is worse than the dropped turn we are trying to avoid. Since “failed to establish link to worker” fails before the first response, the narrow rule still covers the case that motivated this class.