feat/864 playht on prem pr changes

This commit is contained in:
vasudevanubrolu
2025-05-08 10:07:20 +05:30
parent ddeca8eb99
commit 61672f9868

View File

@@ -858,8 +858,7 @@ const synthPlayHT = async(client, logger, {
const {api_key, user_id, voice_engine, playht_tts_uri, options: credOpts} = credentials;
const opts = !!options && Object.keys(options).length !== 0 ? options : JSON.parse(credOpts || '{}');
let synthesizeUrl = (playht_tts_uri + '/api/v2/tts/stream') || 'https://api.play.ht/api/v2/tts/stream';
let synthesizeUrl = playht_tts_uri ? `${playht_tts_uri}/api/v2/tts/stream` : 'https://api.play.ht/api/v2/tts/stream';
// If model is play3.0, the synthesizeUrl is got from authentication endpoint
if (voice_engine === 'Play3.0') {
try {