Skip to content
providerkit
GitHub

ElevenLabsSpeechConfig

Defined in: core/src/providers/elevenlabs-speech.ts:20

apiKey: string;

Defined in: core/src/providers/elevenlabs-speech.ts:21


optional baseUrl?: string;

Defined in: core/src/providers/elevenlabs-speech.ts:27

Default https://api.elevenlabs.io. A regional host (https://api.eu.residency.elevenlabs.io) is passed whole.


optional fetchImpl?: FetchLike;

Defined in: core/src/providers/elevenlabs-speech.ts:34

Swapped in tests, or to route through a proxy. Defaults to global fetch.


optional format?: "wav" | "pcm" | "mp3" | "opus" | "aac" | "flac";

Defined in: core/src/providers/elevenlabs-speech.ts:31

Used when a call names no format. Default “wav”.


optional headers?: Record<string, string>;

Defined in: core/src/providers/elevenlabs-speech.ts:32


optional maxAudioBytes?: number;

Defined in: core/src/speech-core.ts:77

Largest audio accepted, in bytes. Default 32 MiB.

SpeechLimits.maxAudioBytes


optional maxInputChars?: number;

Defined in: core/src/speech-core.ts:75

Longest text, in UTF-16 units (JavaScript’s .length). Default 4,096. Over it is refused before any request. Never silently cut.

SpeechLimits.maxInputChars


optional model?: string;

Defined in: core/src/providers/elevenlabs-speech.ts:24

Default eleven_multilingual_v2, which speaks 29 languages. eleven_flash_v2_5 is faster and costs half as much per character.


optional siteName?: string;

Defined in: core/src/attribution.ts:15

App name, sent as X-Title (e.g. “Your App”).

Attribution.siteName


optional siteUrl?: string;

Defined in: core/src/attribution.ts:13

Site URL, sent as HTTP-Referer (e.g. “https://your.app”).

Attribution.siteUrl


optional timeoutMs?: number;

Defined in: core/src/speech-core.ts:79

One deadline for the whole call, headers and body. Default 120,000.

SpeechLimits.timeoutMs


optional voice?: string;

Defined in: core/src/providers/elevenlabs-speech.ts:29

Used when a call names no voice: a voice id, such as one listElevenLabsVoices returned.