diff --git a/lib/utils/transcription-utils.js b/lib/utils/transcription-utils.js index adfc3e4f..8f0ecd6d 100644 --- a/lib/utils/transcription-utils.js +++ b/lib/utils/transcription-utils.js @@ -34,6 +34,7 @@ const stickyVars = { 'AZURE_SERVICE_ENDPOINT', 'AZURE_INITIAL_SPEECH_TIMEOUT_MS', 'AZURE_USE_OUTPUT_FORMAT_DETAILED', + 'AZURE_SPEECH_SEGMENTATION_SILENCE_TIMEOUT_MS' ], deepgram: [ 'DEEPGRAM_SPEECH_KEYWORDS', @@ -418,6 +419,7 @@ module.exports = (logger) => { }; } else if ('microsoft' === vendor) { + const {azureOptions = {}} = rOpts; opts = { ...opts, ...(rOpts.hints?.length > 0 && typeof rOpts.hints[0] === 'string' && @@ -436,6 +438,8 @@ module.exports = (logger) => { ...(rOpts.requestSnr && {AZURE_REQUEST_SNR: 1}), ...(rOpts.audioLogging && {AZURE_AUDIO_LOGGING: 1}), ...{AZURE_USE_OUTPUT_FORMAT_DETAILED: 1}, + ...(azureOptions.speechSegmentationSilenceTimeoutMs && + {AZURE_SPEECH_SEGMENTATION_SILENCE_TIMEOUT_MS: azureOptions.speechSegmentationSilenceTimeoutMs}), ...(sttCredentials && { ...(sttCredentials.api_key && {AZURE_SUBSCRIPTION_KEY: sttCredentials.api_key}), ...(sttCredentials.region && {AZURE_REGION: sttCredentials.region}), diff --git a/package-lock.json b/package-lock.json index e97b53dd..fc3c3e9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@jambonz/speech-utils": "^0.0.22", "@jambonz/stats-collector": "^0.1.9", "@jambonz/time-series": "^0.2.8", - "@jambonz/verb-specifications": "^0.0.41", + "@jambonz/verb-specifications": "^0.0.44", "@opentelemetry/api": "^1.4.0", "@opentelemetry/exporter-jaeger": "^1.9.0", "@opentelemetry/exporter-trace-otlp-http": "^0.35.0", @@ -3181,9 +3181,9 @@ } }, "node_modules/@jambonz/verb-specifications": { - "version": "0.0.41", - "resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.41.tgz", - "integrity": "sha512-e8swr+UbZdqzVOvGN36IgyGjv8lva+9wN6C4bCiXczjNnxRuk+ihy5Dg6guCOK5G/6qfkaG59591EiClMviLDQ==", + "version": "0.0.44", + "resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.44.tgz", + "integrity": "sha512-mXTbZlJ3AprxooSNvEHYt/9wsky4wHT4mJmL2XrkZGQY6fG/LzVNFVy0Tvx0xZzAVJMY9SmNcDiM0HBNnAufIg==", "dependencies": { "debug": "^4.3.4", "pino": "^8.8.0" @@ -13275,9 +13275,9 @@ } }, "@jambonz/verb-specifications": { - "version": "0.0.41", - "resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.41.tgz", - "integrity": "sha512-e8swr+UbZdqzVOvGN36IgyGjv8lva+9wN6C4bCiXczjNnxRuk+ihy5Dg6guCOK5G/6qfkaG59591EiClMviLDQ==", + "version": "0.0.44", + "resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.44.tgz", + "integrity": "sha512-mXTbZlJ3AprxooSNvEHYt/9wsky4wHT4mJmL2XrkZGQY6fG/LzVNFVy0Tvx0xZzAVJMY9SmNcDiM0HBNnAufIg==", "requires": { "debug": "^4.3.4", "pino": "^8.8.0" diff --git a/package.json b/package.json index dadfeb0f..951fe9b2 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@jambonz/speech-utils": "^0.0.22", "@jambonz/stats-collector": "^0.1.9", "@jambonz/time-series": "^0.2.8", - "@jambonz/verb-specifications": "^0.0.41", + "@jambonz/verb-specifications": "^0.0.44", "@opentelemetry/api": "^1.4.0", "@opentelemetry/exporter-jaeger": "^1.9.0", "@opentelemetry/exporter-trace-otlp-http": "^0.35.0",