@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.
- package/lib/synth-audio.js +3 -3
- package/package.json +1 -1
package/lib/synth-audio.js
CHANGED
|
@@ -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.
|
|
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
|
-
/*
|
|
615
|
-
if (process.env.
|
|
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}`;
|