Skip to content

Commit

Permalink
fixed review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Sep 16, 2024
1 parent c96f1e8 commit 91a5eeb
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,23 @@ function getFileExtension({vendor, renderForCaching = false}) {
case 'elevenlabs':
case 'rimlabs':
case 'playht':
if (!renderForCaching && !JAMBONES_DISABLE_TTS_STREAMING) {
return r8Extension;
} else {
if (renderForCaching || JAMBONES_DISABLE_TTS_STREAMING) {
return mp3Extension;
} else {
return r8Extension;
}
case 'nuance':
case 'nvidia':
case 'verbio':
return r8Extension;
default:
// If vendor is custom
if (vendor.startsWith('custom') &&
!renderForCaching &&
!JAMBONES_DISABLE_TTS_STREAMING) {
return r8Extension;
if (vendor.startsWith('custom')) {
if (renderForCaching || JAMBONES_DISABLE_TTS_STREAMING) {
return mp3Extension;
} else {
return r8Extension;
}
}
return mp3Extension;
}
Expand Down

0 comments on commit 91a5eeb

Please sign in to comment.