STTProviderConfig
Configuration for speech-to-text providers.
Defined in: src/core/types/providers.ts:363
Configuration for speech-to-text providers.
Remarks
Extends BaseProviderConfig with STT-specific options for language, model selection, interim results, punctuation, and keyword boosting.
Example
const sttConfig: STTProviderConfig = {
apiKey: 'your-api-key',
language: 'en-US',
model: 'nova-3',
interimResults: true,
punctuation: true,
keywords: ['CompositeVoice', 'Deepgram'],
};
See
- BaseProviderConfig for inherited fields
- RestSTTProvider for REST-based STT providers
- LiveSTTProvider for WebSocket-based STT 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 |
authType? | "token" | "bearer" | Provider-specific (typically 'token' for Deepgram, ignored for REST providers) | Authentication type for providers that support multiple auth mechanisms. Remarks Controls how the apiKey is sent to the provider: - 'token' — WebSocket subprotocol ['token', apiKey] or header Authorization: Token <key>. This is the default for Deepgram providers. - 'bearer' — WebSocket subprotocol ['bearer', token] or header Authorization: Bearer <token>. Use this for OAuth tokens or providers that expect Bearer auth. REST/SDK providers (Anthropic, OpenAI) handle auth through their SDK constructors and ignore this field. | BaseProviderConfig.authType | src/core/types/providers.ts:111 |
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:122 |
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 |
interimResults? | boolean | undefined | Whether to enable interim (partial) transcription results. Remarks When true, the provider emits results as the user speaks, before the utterance is complete. Only applicable to live/WebSocket providers. | - | src/core/types/providers.ts:388 |
keywords? | string[] | undefined | Custom vocabulary or keyword phrases to boost recognition accuracy. Remarks Useful for domain-specific terminology, product names, or proper nouns that the model might not recognize well by default. | - | src/core/types/providers.ts:402 |
language? | string | undefined | Language code for transcription. Remarks Uses BCP 47 language tags (e.g., 'en-US', 'es-ES', 'fr-FR'). The supported languages depend on the provider and model. | - | src/core/types/providers.ts:371 |
model? | string | undefined | Model to use for transcription. Remarks Provider-specific model identifier (e.g., 'nova-3' for Deepgram). | - | src/core/types/providers.ts:379 |
proxyUrl? | string | undefined | URL of a CompositeVoice proxy server endpoint for this provider. Remarks When set, requests are routed through the proxy which injects the real API key server-side. This keeps API keys out of the browser. For WebSocket providers the HTTP URL is automatically converted to ws(s)://. At least one of apiKey or proxyUrl must be set for providers that require authentication (all except NativeSTT, NativeTTS, and WebLLM). Example proxyUrl: 'http://localhost:3000/api/proxy/deepgram' | BaseProviderConfig.proxyUrl | src/core/types/providers.ts:93 |
punctuation? | boolean | undefined | Whether to enable automatic punctuation in transcription results. | - | src/core/types/providers.ts:393 |
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:131 |