StreamingTTSClientConfigΒΆ

class StreamingTTSClientConfig ( BaseClientConfig )

Provider-agnostic paced text-in/audio-out WebSocket TTS configuration.

Polymorphic Type:

type: streaming_tts

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 streaming TTS 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 = ""

Streaming TTS provider. Supported: openai_realtime, vajra, elevenlabs, deepgram_flux, deepgram_aura, cartesia.

voice_idstr = ""

Optional provider voice identifier.

sample_rateint = 24000

PCM sample rate in Hz.

api_key_envOptional [ str ] = None

Optional provider API-key environment variable override.

pacingTextPacingConfig = TextPacingConfig

Upstream LLM text pacing configuration.

abortTTSAbortConfig = TTSAbortConfig

Adversarial 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 = 1

Whitespace-delimited input words before an explicit duplex response trigger. The field name is retained for compatibility.

languageOptional [ str ] = None

Optional language for protocols that support it.

instructionsOptional [ str ] = None

Optional synthesis instructions for protocols that support them.

task_typeOptional [ str ] = None

Optional provider task type.

chunk_length_schedulelist [ int ] = [120, 160, 250, 290]

ElevenLabs character thresholds for audio generation.

stabilityfloat = 0.5

ElevenLabs voice stability.

similarity_boostfloat = 0.8

ElevenLabs similarity boost.

speedfloat = 1.0

Provider speaking-rate multiplier.

auto_modebool = False

Enable ElevenLabs automatic chunk scheduling.

apply_text_normalizationstr = "off"

ElevenLabs text normalization mode: auto | on | off.

mip_opt_outbool = False

Opt out of the Deepgram Model Improvement Program.

cartesia_versionstr = "2026-03-01"

Cartesia API version header.

max_buffer_delay_msOptional [ int ] = None

Optional Cartesia server-side transcript buffer cap in milliseconds. Set it explicitly for reproducible benchmark runs.