TTSClientConfigΒΆ

class TTSClientConfig ( BaseClientConfig )

Provider-agnostic complete-text HTTP TTS configuration.

Polymorphic Type:

type: 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 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 = ""

HTTP TTS provider. Supported: openai, elevenlabs, deepgram_flux, mistral.

voice_idstr = ""

Voice identifier when required by the provider.

sample_rateint = 24000

Audio sample rate in Hz.

chunk_sizeint = 1024

Read size in bytes for HTTP audio response streaming.

raw_pcmbool = False

Request raw PCM from providers that support selectable output formats.

api_key_envOptional [ str ] = None

Optional provider API-key environment variable override.

stabilityfloat = 0.5

ElevenLabs voice stability.

similarity_boostfloat = 0.8

ElevenLabs similarity boost.

speedfloat = 1.0

Provider speaking-rate multiplier.

apply_text_normalizationstr = "off"

ElevenLabs text normalization mode: auto | on | off.

mip_opt_outbool = False

Opt out of the Deepgram Model Improvement Program.