@jambonz/speech-utils 0.1.8 → 0.1.9

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/config.js CHANGED
@@ -1,5 +1,6 @@
1
1
  const JAMBONES_TTS_TRIM_SILENCE = process.env.JAMBONES_TTS_TRIM_SILENCE;
2
2
  const JAMBONES_DISABLE_TTS_STREAMING = process.env.JAMBONES_DISABLE_TTS_STREAMING;
3
+ const JAMBONES_DISABLE_AZURE_TTS_STREAMING = process.env.JAMBONES_DISABLE_AZURE_TTS_STREAMING;
3
4
 
4
5
  const JAMBONES_HTTP_PROXY_IP = process.env.JAMBONES_HTTP_PROXY_IP;
5
6
  const JAMBONES_HTTP_PROXY_PORT = process.env.JAMBONES_HTTP_PROXY_PORT;
@@ -13,6 +14,7 @@ const HTTP_TIMEOUT = 5000;
13
14
  module.exports = {
14
15
  JAMBONES_TTS_TRIM_SILENCE,
15
16
  JAMBONES_DISABLE_TTS_STREAMING,
17
+ JAMBONES_DISABLE_AZURE_TTS_STREAMING,
16
18
  JAMBONES_HTTP_PROXY_IP,
17
19
  JAMBONES_HTTP_PROXY_PORT,
18
20
  JAMBONES_TTS_CACHE_DURATION_MINS,
@@ -40,6 +40,7 @@ const {AudioEncoding} = require('../stubs/riva/proto/riva_audio_pb');
40
40
  const debug = require('debug')('jambonz:realtimedb-helpers');
41
41
  const {
42
42
  JAMBONES_DISABLE_TTS_STREAMING,
43
+ JAMBONES_DISABLE_AZURE_TTS_STREAMING,
43
44
  JAMBONES_HTTP_PROXY_IP,
44
45
  JAMBONES_HTTP_PROXY_PORT,
45
46
  JAMBONES_TTS_CACHE_DURATION_MINS,
@@ -443,7 +444,8 @@ const synthMicrosoft = async(logger, {
443
444
  content = `<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="https://www.w3.org/2001/mstts" xml:lang="${language}"><voice name="${voice}">${words}</voice></speak>`;
444
445
  logger.info({content}, 'synthMicrosoft');
445
446
  }
446
- if (!JAMBONES_DISABLE_TTS_STREAMING && !renderForCaching && !disableTtsStreaming) {
447
+ if (!JAMBONES_DISABLE_TTS_STREAMING && !JAMBONES_DISABLE_AZURE_TTS_STREAMING &&
448
+ !renderForCaching && !disableTtsStreaming) {
447
449
  let params = '';
448
450
  params += `{api_key=${apiKey}`;
449
451
  params += `,language=${language}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/speech-utils",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "TTS-related speech utilities for jambonz",
5
5
  "main": "index.js",
6
6
  "author": "Dave Horton",