Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
NvidiaTTS
Neural text-to-speech via NVIDIA Riva / NIM. GPU-accelerated synthesis using Riva voices (e.g. Magpie multilingual / RAD-TTS), with streaming output.Constructor
NVIDIA API key. Falls back to
NVIDIA_API_KEY.Riva voice name, e.g.
"English-US-Female-1" or a Magpie voice like "Magpie-Multilingual.EN-US.Mia". Default "English-US-Female-1".BCP-47 language tag. Default
"en-US".Output rate in Hz. Default 22050.
Riva gRPC endpoint. Default "".
aclose
emit
The event to emit.
interrupt
off
The event the handler was registered for.
The handler to remove.
on
callback is omitted.
The event to listen for.
The handler to invoke when the event is emitted. If
None, a decorator is returned that registers the decorated function.The registered callback when
callback is provided, otherwise a decorator that registers and returns the function it wraps.on_first_audio_byte
A callable, optionally async, invoked with synthesis timing information when the first audio byte is emitted.
synthesize
The text to synthesize; coerced to a string if needed.