Skip to content

Commit

Permalink
Merge pull request #91 from jambonz/fix/diff_playht_voice_quality
Browse files Browse the repository at this point in the history
fix playht has stream and cached audio differrent quality
  • Loading branch information
davehorton authored Sep 16, 2024
2 parents 8f216e6 + 91a5eeb commit 75be865
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,25 @@ function getFileExtension({vendor, renderForCaching = false}) {
case 'deepgram':
case 'elevenlabs':
case 'rimlabs':
if (!renderForCaching && !JAMBONES_DISABLE_TTS_STREAMING) {
return r8Extension;
} else {
case 'playht':
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')) {
if (renderForCaching || JAMBONES_DISABLE_TTS_STREAMING) {
return mp3Extension;
} else {
return r8Extension;
}
}
return mp3Extension;
}
}
Expand Down

0 comments on commit 75be865

Please sign in to comment.