Class: DeepgramTextToSpeechProvider
Defined in: packages/agentos/src/io/speech/providers/DeepgramTextToSpeechProvider.ts:123
Text-to-speech provider backed by the Deepgram Aura /v1/speak REST API.
API Contract
- Endpoint:
POST {baseUrl}/speak?model={voice}&encoding={enc} - Authentication:
Authorization: Token <apiKey> - Request body:
{ text } - Response: Raw audio bytes (
audio/mpegfor mp3)
Aura caps a request at 2000 characters, so longer text is chunked at sentence boundaries and the audio buffers are concatenated.
Example
const provider = new DeepgramTextToSpeechProvider({
apiKey: process.env.DEEPGRAM_API_KEY!,
voice: 'aura-2-arcas-en',
});
const result = await provider.synthesize('Hello there!');
Implements
Constructors
Constructor
new DeepgramTextToSpeechProvider(
config):DeepgramTextToSpeechProvider
Defined in: packages/agentos/src/io/speech/providers/DeepgramTextToSpeechProvider.ts:131
Parameters
config
DeepgramTextToSpeechProviderConfig
Returns
DeepgramTextToSpeechProvider
Properties
displayName
readonlydisplayName:"Deepgram Aura"='Deepgram Aura'
Defined in: packages/agentos/src/io/speech/providers/DeepgramTextToSpeechProvider.ts:125
Implementation of
TextToSpeechProvider.displayName
id
readonlyid:"deepgram-aura"='deepgram-aura'
Defined in: packages/agentos/src/io/speech/providers/DeepgramTextToSpeechProvider.ts:124
Implementation of
supportsStreaming
readonlysupportsStreaming:true=true
Defined in: packages/agentos/src/io/speech/providers/DeepgramTextToSpeechProvider.ts:126
Implementation of
TextToSpeechProvider.supportsStreaming
Methods
getProviderName()
getProviderName():
string
Defined in: packages/agentos/src/io/speech/providers/DeepgramTextToSpeechProvider.ts:136
Returns
string
Implementation of
TextToSpeechProvider.getProviderName
listAvailableVoices()
listAvailableVoices():
Promise<SpeechVoice[]>
Defined in: packages/agentos/src/io/speech/providers/DeepgramTextToSpeechProvider.ts:197
Returns the static Aura-2 voice catalog (a shallow copy).
Returns
Promise<SpeechVoice[]>
Implementation of
TextToSpeechProvider.listAvailableVoices
synthesize()
synthesize(
text,options?):Promise<SpeechSynthesisResult>
Defined in: packages/agentos/src/io/speech/providers/DeepgramTextToSpeechProvider.ts:140
Parameters
text
string
options?
Returns
Promise<SpeechSynthesisResult>