TTSProviderConfig
Configuration for text-to-speech providers.
Defined in: src/core/types/providers.ts:959
Configuration for text-to-speech providers.
Remarks
Extends BaseProviderConfig with TTS-specific options for voice selection, model, speech rate, pitch, and output audio format.
Example
const ttsConfig: TTSProviderConfig = {
apiKey: 'your-api-key',
voice: 'aura-asteria-en',
model: 'aura-2',
rate: 1.0,
outputFormat: 'pcm',
sampleRate: 24000,
};
See
- BaseProviderConfig for inherited fields
- RestTTSProvider for REST-based TTS providers
- LiveTTSProvider for WebSocket-based TTS providers
Extends
Extended by
Properties
| Property | Type | Default value | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
apiKey? | string | undefined | API key or authentication token for the provider. Remarks For client-side usage, consider using a proxy server to keep API keys secure. The SDK provides Express, Next.js, and Node adapters for this purpose. | BaseProviderConfig.apiKey | src/core/types/providers.ts:67 |
debug? | boolean | false | Whether to enable debug logging for this provider. Remarks When true, the provider emits detailed internal logs. This is separate from the SDK-level LoggingConfig. | BaseProviderConfig.debug | src/core/types/providers.ts:86 |
endpoint? | string | undefined | Custom endpoint URL to override the provider’s default API endpoint. Remarks Useful for self-hosted instances, proxy servers, or development environments. | BaseProviderConfig.endpoint | src/core/types/providers.ts:75 |
model? | string | undefined | Model to use for text-to-speech synthesis. Remarks Provider-specific model identifier (e.g., 'aura-2' for Deepgram). | - | src/core/types/providers.ts:975 |
outputFormat? | string | undefined | Output audio format identifier. Remarks Provider-specific format string (e.g., 'linear16', 'mp3', 'opus'). | - | src/core/types/providers.ts:1000 |
pitch? | number | undefined | Pitch adjustment in semitones. Remarks Values from -20 to +20 semitones. Not all providers support pitch adjustment. | - | src/core/types/providers.ts:992 |
rate? | number | undefined | Speech rate multiplier. Remarks Values from 0.25 (quarter speed) to 4.0 (quadruple speed), where 1.0 is normal speed. Not all providers support rate adjustment. | - | src/core/types/providers.ts:984 |
sampleRate? | number | undefined | Sample rate for the output audio in Hz. Remarks Common values are 16000, 24000, and 48000. Must match the format capabilities of the chosen voice and model. | - | src/core/types/providers.ts:1009 |
timeout? | number | undefined | Request timeout in milliseconds. Remarks Applies to HTTP requests (REST providers) and connection establishment (WebSocket providers). Set to 0 for no timeout. | BaseProviderConfig.timeout | src/core/types/providers.ts:95 |
voice? | string | undefined | Voice ID or name to use for synthesis. Remarks Provider-specific voice identifier. For example, Deepgram uses identifiers like 'aura-asteria-en', while ElevenLabs uses voice IDs. | - | src/core/types/providers.ts:967 |