@jambonz/speech-utils 0.0.39 → 0.0.41

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.
@@ -145,7 +145,7 @@ async function synthAudio(client, logger, stats, { account_sid,
145
145
  ['microsoft', 'azure'].includes(vendor)
146
146
  ) ||
147
147
  (
148
- process.env.JAMBONES_ELEVENLABS_STREAMING &&
148
+ !process.env.JAMBONES_DISABLE_TTS_STREAMING &&
149
149
  vendor === 'elevenlabs'
150
150
  )
151
151
  ) {
@@ -611,8 +611,8 @@ const synthElevenlabs = async(logger, {credentials, options, stats, language, vo
611
611
  const {api_key, model_id, options: credOpts} = credentials;
612
612
  const opts = !!options && Object.keys(options).length !== 0 ? options : JSON.parse(credOpts || '{}');
613
613
 
614
- /* if the env is set to stream then bag out, unless we are specifically rendering to generate a cache file */
615
- if (process.env.JAMBONES_ELEVENLABS_STREAMING && !renderForCaching) {
614
+ /* default to using the streaming interface, unless disabled by env var OR we want just a cache file */
615
+ if (!process.env.JAMBONES_DISABLE_TTS_STREAMING && !renderForCaching) {
616
616
  let params = '';
617
617
  params += `{api_key=${api_key}`;
618
618
  params += `,model_id=${model_id}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/speech-utils",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
4
4
  "description": "TTS-related speech utilities for jambonz",
5
5
  "main": "index.js",
6
6
  "author": "Dave Horton",