@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.
@@ -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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/speech-utils",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "TTS-related speech utilities for jambonz",
5
5
  "main": "index.js",
6
6
  "author": "Dave Horton",