> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Nvidia

> Python API reference for the nvidia speech-to-text plugin.

<Card title="Usage guide" icon="book" href="/plugins/stt/nvidia" horizontal>
  Setup, environment variables, and Python/JavaScript/Go usage examples.
</Card>

## NvidiaSTT

Streaming speech recognition via NVIDIA Riva / NIM.

GPU-accelerated ASR over gRPC using Parakeet/Conformer models, with optional
Sortformer speaker diarization and automatic punctuation.

### Constructor

```python theme={null}
NvidiaSTT(*, api_key: 'str | None' = None, model: 'str' = 'parakeet-1.1b-en-US-asr-streaming-silero-vad-sortformer', server: 'str' = 'grpc.nvcf.nvidia.com:443', function_id: 'str' = '', language_code: 'str' = 'en-US', sample_rate: 'int' = 16000, use_ssl: 'bool' = True, profanity_filter: 'bool' = False, automatic_punctuation: 'bool' = True) -> 'None'
```

<ParamField path="api_key" type="str | None">
  NVIDIA API key. Falls back to `NVIDIA_API_KEY`.
</ParamField>

<ParamField path="model" type="str" default="parakeet-1.1b-en-US-asr-streaming-silero-vad-sortformer">
  Riva/NIM ASR model. Default `"parakeet-1.1b-en-US-asr-streaming- silero-vad-sortformer"` (Parakeet 1.1B with Silero VAD + Sortformer diarization).
</ParamField>

<ParamField path="server" type="str" default="grpc.nvcf.nvidia.com:443">
  Riva gRPC endpoint. Default `"grpc.nvcf.nvidia.com:443"`.
</ParamField>

<ParamField path="function_id" type="str" default="">
  NVCF function id for the hosted model. Default "".
</ParamField>

<ParamField path="language_code" type="str" default="en-US">
  BCP-47 language tag. Default `"en-US"`.
</ParamField>

<ParamField path="sample_rate" type="int" default="16000">
  Input rate in Hz. Default 16000.
</ParamField>

<ParamField path="use_ssl" type="bool" default="True">
  Use a TLS/SSL gRPC channel. Default True.
</ParamField>

<ParamField path="profanity_filter" type="bool" default="False">
  Mask profanity. Default False.
</ParamField>

<ParamField path="automatic_punctuation" type="bool" default="True">
  Add punctuation to the transcript. Default True.
</ParamField>

### aclose

```python theme={null}
def aclose(self) -> 'None'
```

Release any resources held by the provider.

### emit

```python theme={null}
def emit(self, event: 'T', *args: 'Any') -> 'None'
```

Emit an event, invoking all registered handlers with the given arguments.

Handlers are called in registration order. Coroutine handlers are
scheduled on the running event loop. If the emitter is closed, the call
is a no-op.

<ParamField path="event" type="T" required>
  The event to emit.
</ParamField>

### off

```python theme={null}
def off(self, event: 'T', callback: 'Callable[..., Any]') -> 'None'
```

Remove a previously registered handler for an event.

If the handler is not registered for the event, the call is a no-op.

<ParamField path="event" type="T" required>
  The event the handler was registered for.
</ParamField>

<ParamField path="callback" type="Callable[..., Any]" required>
  The handler to remove.
</ParamField>

### on

```python theme={null}
def on(self, event: 'T', callback: 'Callable[..., Any] | None' = None) -> 'Callable[..., Any]'
```

Register a handler for an event.

Can be used directly by passing a callback, or as a decorator when
`callback` is omitted.

<ParamField path="event" type="T" required>
  The event to listen for.
</ParamField>

<ParamField path="callback" type="Callable[..., Any] | None">
  The handler to invoke when the event is emitted. If `None`, a decorator is returned that registers the decorated function.
</ParamField>

<ResponseField name="returns" type="Callable[..., Any]">
  The registered callback when `callback` is provided, otherwise a decorator that registers and returns the function it wraps.
</ResponseField>

### on\_stt\_transcript

```python theme={null}
def on_stt_transcript(self, callback: 'Callable[[STTResponse], Awaitable[None]]') -> 'None'
```

Register the coroutine invoked when a transcription event is produced.

<ParamField path="callback" type="Callable[[STTResponse], Awaitable[None]]" required>
  An async callable that receives each `STTResponse`.
</ParamField>

### process\_audio

```python theme={null}
def process_audio(self, audio_frames: 'bytes', language: 'Optional[str]' = None, **kwargs: 'Any') -> 'None'
```

Process a chunk of audio for transcription.

Implementations should consume the audio frames and emit transcription
results through the registered transcript callback.

<ParamField path="audio_frames" type="bytes" required>
  Raw audio bytes to transcribe.
</ParamField>

<ParamField path="language" type="Optional[str]">
  Optional language code to guide recognition.
</ParamField>

### stream\_transcribe

```python theme={null}
def stream_transcribe(self, audio_stream: 'AsyncIterator[bytes]', **kwargs: 'Any') -> 'AsyncIterator[STTResponse]'
```

Transcribe a continuous audio stream.

<ParamField path="audio_stream" type="AsyncIterator[bytes]" required>
  An async iterator yielding raw audio byte chunks.
</ParamField>

<ResponseField name="returns" type="AsyncIterator[STTResponse]">
  STTResponse: Transcription events produced as audio is consumed.
</ResponseField>
