Skip to content

TranscribeSTTConfig

Configuration options for the TranscribeSTT provider.

Defined in: src/providers/stt/transcribe/TranscribeSTT.ts:64

Configuration options for the TranscribeSTT provider.

Remarks

Extends STTProviderConfig with Amazon Transcribe-specific settings. You must provide either credentials + region (for direct connections via a SigV4-presigned URL) or proxyUrl (for a server-side proxy that presigns the upstream URL). If both are provided, proxyUrl takes precedence.

For direct browser connections, use temporary credentials (STS/Cognito) fetched from your backend via an async credentials factory — never embed long-lived AWS keys in client code.

Example

// Direct connection with a temporary-credentials factory
const config: TranscribeSTTConfig = {
  credentials: async () => {
    const res = await fetch('/api/aws-temp-credentials');
    return res.json(); // { accessKeyId, secretAccessKey, sessionToken }
  },
  region: 'us-east-1',
  languageCode: 'en-US',
};

// Proxy connection (recommended for production)
const proxyConfig: TranscribeSTTConfig = {
  proxyUrl: 'http://localhost:3001/api/proxy/transcribe',
  languageCode: 'en-US',
};

See

TranscribeSTT for the provider class

Extends

Properties

PropertyTypeDefault valueDescriptionInherited fromDefined in
apiKey?string | () => Promise<string>undefinedAPI key or authentication token for the provider. Remarks Can be a static string or an async factory function that returns a fresh token on each call. Use a factory for short-lived tokens (e.g. Deepgram JWTs) so each WebSocket connection gets a valid credential. 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.STTProviderConfig.apiKeysrc/core/types/providers.ts:71
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.STTProviderConfig.authTypesrc/core/types/providers.ts:115
credentials?AwsCredentialsProviderundefinedAWS credentials, static or as an async factory. Remarks Required in direct mode (no proxyUrl). A factory is invoked on every connect() so each presigned URL uses fresh temporary credentials.-src/providers/stt/transcribe/TranscribeSTT.ts:72
debug?booleanfalseWhether to enable debug logging for this provider. Remarks When true, the provider emits detailed internal logs. This is separate from the SDK-level LoggingConfig.STTProviderConfig.debugsrc/core/types/providers.ts:126
enablePartialResultsStabilization?booleanfalseEnable partial-results stabilization to reduce latency of interim results. See TranscribeSTTConfig.partialResultsStability-src/providers/stt/transcribe/TranscribeSTT.ts:116
endpoint?stringundefinedCustom endpoint URL to override the provider’s default API endpoint. Remarks Useful for self-hosted instances, proxy servers, or development environments.STTProviderConfig.endpointsrc/core/types/providers.ts:79
identifyLanguage?booleanfalseEnable automatic language identification. Remarks When set, provide the candidate languages via TranscribeSTTConfig.languageOptions and Transcribe ignores languageCode.-src/providers/stt/transcribe/TranscribeSTT.ts:157
interimResults?booleanundefinedWhether 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.STTProviderConfig.interimResultssrc/core/types/providers.ts:392
keywords?string[]undefinedCustom 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.STTProviderConfig.keywordssrc/core/types/providers.ts:406
language?stringundefinedLanguage 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.STTProviderConfig.languagesrc/core/types/providers.ts:375
languageCode?string'en-US'Language of the input audio (e.g. 'en-US', 'es-US', 'fr-FR'). Remarks Falls back to the base language option when omitted.-src/providers/stt/transcribe/TranscribeSTT.ts:90
languageOptions?string[]undefinedCandidate language codes for automatic language identification (e.g. ['en-US', 'es-US']). Requires identifyLanguage.-src/providers/stt/transcribe/TranscribeSTT.ts:163
mediaEncoding?"pcm" | "flac" | "ogg-opus"'pcm'Encoding of the streamed audio. Remarks 'pcm' is signed 16-bit little-endian mono — the format the SDK’s MicrophoneInput produces.-src/providers/stt/transcribe/TranscribeSTT.ts:101
model?stringundefinedModel to use for transcription. Remarks Provider-specific model identifier (e.g., 'nova-3' for Deepgram).STTProviderConfig.modelsrc/core/types/providers.ts:383
partialResultsStability?TranscribePartialResultsStabilityTranscribe’s server default ('high' is lowest latency)Stability level used when enablePartialResultsStabilization is on.-src/providers/stt/transcribe/TranscribeSTT.ts:123
preferredLanguage?stringundefinedPreferred language from TranscribeSTTConfig.languageOptions, to speed up language identification.-src/providers/stt/transcribe/TranscribeSTT.ts:169
proxyUrl?stringundefinedURL 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'STTProviderConfig.proxyUrlsrc/core/types/providers.ts:97
punctuation?booleanundefinedWhether to enable automatic punctuation in transcription results.STTProviderConfig.punctuationsrc/core/types/providers.ts:397
region?stringundefinedAWS region hosting the Transcribe streaming endpoint (e.g. 'us-east-1'). Remarks Required in direct mode; ignored in proxy mode (the proxy holds the region).-src/providers/stt/transcribe/TranscribeSTT.ts:80
sampleRate?number16000Audio sample rate in Hz (8000–48000).-src/providers/stt/transcribe/TranscribeSTT.ts:108
sessionId?stringundefinedSession ID (UUID) for request tracking / session resume.-src/providers/stt/transcribe/TranscribeSTT.ts:174
showSpeakerLabel?booleanfalseEnable speaker partitioning (diarization) — items carry a Speaker label.-src/providers/stt/transcribe/TranscribeSTT.ts:145
timeout?numberundefinedRequest timeout in milliseconds. Remarks Applies to HTTP requests (REST providers) and connection establishment (WebSocket providers). Set to 0 for no timeout.STTProviderConfig.timeoutsrc/core/types/providers.ts:135
vocabularyFilterMethod?"tag" | "remove" | "mask"undefinedHow the vocabulary filter is applied (remove, mask, or tag).-src/providers/stt/transcribe/TranscribeSTT.ts:138
vocabularyFilterName?stringundefinedName of a custom vocabulary filter to apply.-src/providers/stt/transcribe/TranscribeSTT.ts:133
vocabularyName?stringundefinedName of a custom vocabulary to apply.-src/providers/stt/transcribe/TranscribeSTT.ts:128

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency