fixed review comment

This commit is contained in:
Quan HL
2024-09-16 18:46:10 +07:00
parent c96f1e86ee
commit 91a5eebbaf

View File

@@ -49,10 +49,10 @@ 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':
@@ -60,10 +60,12 @@ function getFileExtension({vendor, renderForCaching = false}) {
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;
}