diff --git a/lib/synth-audio.js b/lib/synth-audio.js index cb49653..edee6bd 100644 --- a/lib/synth-audio.js +++ b/lib/synth-audio.js @@ -141,7 +141,7 @@ async function synthAudio(client, logger, stats, { account_sid, let filePath; if (['nuance', 'nvidia'].includes(vendor) || ( - process.env.JAMBONES_TTS_TRIM_SILENCE && + (process.env.JAMBONES_TTS_TRIM_SILENCE || !process.env.JAMBONES_DISABLE_TTS_STREAMING) && ['microsoft', 'azure'].includes(vendor) ) || ( @@ -414,6 +414,7 @@ const synthMicrosoft = async(logger, { params += `,language=${language}`; params += ',vendor=microsoft'; params += `,voice=${voice}`; + params += ',write_cache_file=1'; if (region) params += `,region=${region}`; if (custom_tts_endpoint) params += `,endpointId=${custom_tts_endpoint}`; if (process.env.JAMBONES_HTTP_PROXY_IP) params += `,http_proxy_ip=${process.env.JAMBONES_HTTP_PROXY_IP}`; diff --git a/package-lock.json b/package-lock.json index 5ae7bdc..6bb28a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@jambonz/speech-utils", - "version": "0.0.45", + "version": "0.0.47", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@jambonz/speech-utils", - "version": "0.0.45", + "version": "0.0.47", "license": "MIT", "dependencies": { "@aws-sdk/client-polly": "^3.496.0", diff --git a/package.json b/package.json index 0d3523c..7dbc082 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@jambonz/speech-utils", - "version": "0.0.45", + "version": "0.0.47", "description": "TTS-related speech utilities for jambonz", "main": "index.js", "author": "Dave Horton",