STTClientConfigΒΆ
class STTClientConfig ( BaseClientConfig )
STT client configuration for realtime streaming speech-to-text APIs.
Polymorphic Type:
type: sttAll
BaseClientConfigtypes:
openai_chat_completions: OpenAIChatCompletionsClientConfig
tts: TTSClientConfig
streaming_tts: StreamingTTSClientConfig
stt: STTClientConfig
openai_completions: OpenAICompletionsClientConfig
openai_router: OpenAIRouterClientConfig
Fields:
api_baseOptional [ str ] =NoneAPI base URL. Defaults to OPENAI_API_BASE env var.
api_keyOptional [ str ] =NoneAPI 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 =300The 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 =16000Expected audio sample rate in Hz.
ws_chunk_sizeint =4096Bytes 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 =FalseNegotiate WebSocket permessage-deflate compression. Disabled by default because base64 PCM is high entropy and compression adds substantial client and server CPU.
ws_realtime_pacingbool =FalseSleep 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 ] =20WebSocket ping interval in seconds; None disables pings.
ws_ping_timeout_sOptional [ int ] =NoneWebSocket ping timeout in seconds. None disables keepalive timeout while preserving request_timeout.
api_key_envOptional [ str ] =NoneOptional provider API-key environment variable override.
languagestr ="en"Requested transcription language.
mip_opt_outbool =FalseOpt out of the Deepgram Model Improvement Program.
target_streaming_delay_msOptional [ int ] =NoneOptional Mistral transcription context delay in milliseconds.
cartesia_versionstr ="2026-03-01"Cartesia API version header.