STTClientConfigΒΆ

class STTClientConfig ( BaseClientConfig )

STT client configuration for realtime streaming speech-to-text APIs.

Polymorphic Type:

type: stt

All BaseClientConfig types:

Fields:

api_baseOptional [ str ] = None

API base URL. Defaults to OPENAI_API_BASE env var.

api_keyOptional [ str ] = None

API key. Defaults to OPENAI_API_KEY env var.

modelstr = ""

The STT model ID.

address_append_valuestr = "chat/completions"

The address append value for the LLM API.

request_timeoutint = 300

The timeout for each request to the LLM API (in seconds).

additional_sampling_paramsstr = "{}"

Additional sampling params to send with each request to the LLM API.

providerstr = ""

STT provider name. Supported: vajra_openai_realtime, vllm_realtime, deepgram_flux, deepgram_nova, elevenlabs, mistral, cartesia, together.

sample_rateint = 16000

Expected audio sample rate in Hz.

ws_chunk_sizeint = 4096

Bytes of raw PCM audio per WebSocket message. Client CPU scales with concurrency * sample_rate * 2 / ws_chunk_size, so prefer larger chunks at high concurrency.

ws_permessage_deflatebool = False

Negotiate WebSocket permessage-deflate compression. Disabled by default because base64 PCM is high entropy and compression adds substantial client and server CPU.

ws_realtime_pacingbool = False

Sleep between WebSocket audio chunks to simulate realtime input. Enable for live-audio SLO measurements; disable for engine-bound throughput measurements.

ws_ping_interval_sOptional [ int ] = 20

WebSocket ping interval in seconds; None disables pings.

ws_ping_timeout_sOptional [ int ] = None

WebSocket ping timeout in seconds. None disables keepalive timeout while preserving request_timeout.

api_key_envOptional [ str ] = None

Optional provider API-key environment variable override.

languagestr = "en"

Requested transcription language.

mip_opt_outbool = False

Opt out of the Deepgram Model Improvement Program.

target_streaming_delay_msOptional [ int ] = None

Optional Mistral transcription context delay in milliseconds.

cartesia_versionstr = "2026-03-01"

Cartesia API version header.