StreamingTTSClientConfigΒΆ
class StreamingTTSClientConfig ( BaseClientConfig )
Provider-agnostic paced text-in/audio-out WebSocket TTS configuration.
Polymorphic Type:
type: streaming_ttsAll
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 streaming TTS 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 =""Streaming TTS provider. Supported: openai_realtime, vajra, elevenlabs, deepgram_flux, deepgram_aura, cartesia.
voice_idstr =""Optional provider voice identifier.
sample_rateint =24000PCM sample rate in Hz.
api_key_envOptional [ str ] =NoneOptional provider API-key environment variable override.
pacingTextPacingConfig = TextPacingConfigUpstream LLM text pacing configuration.
abortTTSAbortConfig = TTSAbortConfigAdversarial mid-stream abort injection for the Vajra provider.
input_output_modestr ="complete_text"Explicit response scheduling: complete_text or duplex. Providers that synthesize on text receipt use their native trigger behavior.
duplex_start_after_tokensint =1Whitespace-delimited input words before an explicit duplex response trigger. The field name is retained for compatibility.
languageOptional [ str ] =NoneOptional language for protocols that support it.
instructionsOptional [ str ] =NoneOptional synthesis instructions for protocols that support them.
task_typeOptional [ str ] =NoneOptional provider task type.
chunk_length_schedulelist [ int ] =[120, 160, 250, 290]ElevenLabs character thresholds for audio generation.
stabilityfloat =0.5ElevenLabs voice stability.
similarity_boostfloat =0.8ElevenLabs similarity boost.
speedfloat =1.0Provider speaking-rate multiplier.
auto_modebool =FalseEnable ElevenLabs automatic chunk scheduling.
apply_text_normalizationstr ="off"ElevenLabs text normalization mode: auto | on | off.
mip_opt_outbool =FalseOpt out of the Deepgram Model Improvement Program.
cartesia_versionstr ="2026-03-01"Cartesia API version header.
max_buffer_delay_msOptional [ int ] =NoneOptional Cartesia server-side transcript buffer cap in milliseconds. Set it explicitly for reproducible benchmark runs.