Interface ElevenLabsTextToSpeechProviderConfig

Configuration for the ElevenLabsTextToSpeechProvider.

interface ElevenLabsTextToSpeechProviderConfig {
    apiKey: string;
    baseUrl?: string;
    voiceId?: string;
    model?: string;
    fetchImpl?: {
        (input, init?): Promise<Response>;
        (input, init?): Promise<Response>;
    };
}

Properties

apiKey: string

ElevenLabs API key used for authentication. Sent as the xi-api-key header value (not Bearer-style auth).

baseUrl?: string

Base URL for the ElevenLabs API. Override for proxies or self-hosted instances.

Default

'https://api.elevenlabs.io/v1'
voiceId?: string

Default voice ID. ElevenLabs uses opaque IDs (not human-readable names).

Default

'EXAVITQu4vr4xnSDxMaL' (the "Sarah" voice)
model?: string

Default model ID for synthesis.

Default

'eleven_multilingual_v2'
fetchImpl?: {
    (input, init?): Promise<Response>;
    (input, init?): Promise<Response>;
}

Custom fetch implementation for dependency injection in tests.

Type declaration

    • (input, init?): Promise<Response>
    • Parameters

      • input: RequestInfo | URL
      • Optional init: RequestInit

      Returns Promise<Response>

    • (input, init?): Promise<Response>
    • Parameters

      • input: string | Request | URL
      • Optional init: RequestInit

      Returns Promise<Response>

Default

globalThis.fetch