@jambonz/speech-utils 0.2.9 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/synth-audio.js +2 -3
- package/package.json +1 -1
package/lib/synth-audio.js
CHANGED
|
@@ -855,11 +855,10 @@ const synthElevenlabs = async(logger, {
|
|
|
855
855
|
const synthPlayHT = async(client, logger, {
|
|
856
856
|
credentials, options, stats, voice, language, text, renderForCaching, disableTtsStreaming
|
|
857
857
|
}) => {
|
|
858
|
-
const {api_key, user_id, voice_engine, options: credOpts} = credentials;
|
|
858
|
+
const {api_key, user_id, voice_engine, playht_tts_uri, options: credOpts} = credentials;
|
|
859
859
|
const opts = !!options && Object.keys(options).length !== 0 ? options : JSON.parse(credOpts || '{}');
|
|
860
860
|
|
|
861
|
-
let synthesizeUrl = 'https://api.play.ht/api/v2/tts/stream';
|
|
862
|
-
|
|
861
|
+
let synthesizeUrl = playht_tts_uri ? `${playht_tts_uri}/api/v2/tts/stream` : 'https://api.play.ht/api/v2/tts/stream';
|
|
863
862
|
// If model is play3.0, the synthesizeUrl is got from authentication endpoint
|
|
864
863
|
if (voice_engine === 'Play3.0') {
|
|
865
864
|
try {
|