support tts deepgram (#277)

This commit is contained in:
Hoan Luu Huu
2023-12-26 19:47:19 +07:00
committed by GitHub
parent 55d8fdef1c
commit 997ff05f3c
4 changed files with 38 additions and 9 deletions
+19
View File
@@ -233,6 +233,24 @@ const testWhisper = async(logger, synthAudio, credentials) => {
}
};
const testDeepgramTTS = async(logger, synthAudio, credentials) => {
try {
await synthAudio({increment: () => {}, histogram: () => {}},
{
vendor: 'deepgram',
credentials,
language: 'en-US',
voice: 'alpha-aurora-en-v2',
model: 'alpha-aurora-en-v2',
text: 'Hi there and welcome to jambones!'
}
);
} catch (err) {
logger.info({err}, 'testDeepgramTTS returned error');
throw err;
}
};
const testIbmTts = async(logger, getTtsVoices, credentials) => {
const {tts_api_key, tts_region} = credentials;
const voices = await getTtsVoices({vendor: 'ibm', credentials: {tts_api_key, tts_region}});
@@ -418,6 +436,7 @@ module.exports = {
testSonioxStt,
testElevenlabs,
testAssemblyStt,
testDeepgramTTS,
getSpeechCredential,
decryptCredential,
testWhisper