Skip to content

Commit

Permalink
fix deepgram and playht has white noise from begining of cache audio
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Oct 21, 2024
1 parent f183852 commit 3f5a520
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function makeFilePath({vendor, key, salt = '', renderForCaching = false}) {

function getFileExtension({vendor, renderForCaching = false}) {
const mp3Extension = 'mp3';
const wavExtension = 'wav';
const r8Extension = 'r8';

switch (vendor) {
Expand All @@ -45,15 +46,20 @@ function getFileExtension({vendor, renderForCaching = false}) {
} else {
return mp3Extension;
}
case 'deepgram':
case 'elevenlabs':
case 'rimelabs':
case 'playht':
if (renderForCaching || JAMBONES_DISABLE_TTS_STREAMING) {
return mp3Extension;
} else {
return r8Extension;
}
case 'playht':
case 'deepgram':
if (renderForCaching || JAMBONES_DISABLE_TTS_STREAMING) {
return mp3Extension;
} else {
return wavExtension;
}
case 'nuance':
case 'nvidia':
case 'verbio':
Expand Down

0 comments on commit 3f5a520

Please sign in to comment.