enable azure stt through a proxy (#275)

This commit is contained in:
Dave Horton
2023-12-18 12:37:10 -05:00
committed by GitHub
parent c6b8ec1b28
commit 7d355f2fac
3 changed files with 15 additions and 8 deletions

View File

@@ -95,6 +95,13 @@ const testMicrosoftStt = async(logger, credentials) => {
const speechConfig = sdk.SpeechConfig.fromSubscription(api_key, region);
const audioConfig = sdk.AudioConfig.fromWavFileInput(fs.readFileSync(`${__dirname}/../../data/test_audio.wav`));
speechConfig.speechRecognitionLanguage = 'en-US';
if (process.env.JAMBONES_HTTP_PROXY_IP && process.env.JAMBONES_HTTP_PROXY_PORT) {
logger.debug(
`testMicrosoftStt: using proxy ${process.env.JAMBONES_HTTP_PROXY_IP}:${process.env.JAMBONES_HTTP_PROXY_PORT}`);
speechConfig.setProxy(process.env.JAMBONES_HTTP_PROXY_IP, process.env.JAMBONES_HTTP_PROXY_PORT);
}
const speechRecognizer = new sdk.SpeechRecognizer(speechConfig, audioConfig);
return new Promise((resolve, reject) => {

14
package-lock.json generated
View File

@@ -19,7 +19,7 @@
"@jambonz/lamejs": "^1.2.2",
"@jambonz/mw-registrar": "^0.2.7",
"@jambonz/realtimedb-helpers": "^0.8.7",
"@jambonz/speech-utils": "^0.0.31",
"@jambonz/speech-utils": "^0.0.32",
"@jambonz/time-series": "^0.2.8",
"@jambonz/verb-specifications": "^0.0.45",
"@soniox/soniox-node": "^1.1.1",
@@ -2255,9 +2255,9 @@
}
},
"node_modules/@jambonz/speech-utils": {
"version": "0.0.31",
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.0.31.tgz",
"integrity": "sha512-U9bxEx93lc/6Ru6kAtER1S/cQJ5MfHw9AGVafrkdlbBuHHXWFvKgb1nQDvEsaEDg8+36ukI9Zrkub2eClzSaMA==",
"version": "0.0.32",
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.0.32.tgz",
"integrity": "sha512-5NrsuWX6Oq9RMieIaAZYJMXLQVYuXPLY2vG04b9yufpDdAd4ah50DOSIztXZBy+mV8CCyAyB1S3NNGu28QnJFQ==",
"dependencies": {
"@aws-sdk/client-polly": "^3.359.0",
"@aws-sdk/client-sts": "^3.458.0",
@@ -12947,9 +12947,9 @@
}
},
"@jambonz/speech-utils": {
"version": "0.0.31",
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.0.31.tgz",
"integrity": "sha512-U9bxEx93lc/6Ru6kAtER1S/cQJ5MfHw9AGVafrkdlbBuHHXWFvKgb1nQDvEsaEDg8+36ukI9Zrkub2eClzSaMA==",
"version": "0.0.32",
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.0.32.tgz",
"integrity": "sha512-5NrsuWX6Oq9RMieIaAZYJMXLQVYuXPLY2vG04b9yufpDdAd4ah50DOSIztXZBy+mV8CCyAyB1S3NNGu28QnJFQ==",
"requires": {
"@aws-sdk/client-polly": "^3.359.0",
"@aws-sdk/client-sts": "^3.458.0",

View File

@@ -29,7 +29,7 @@
"@jambonz/lamejs": "^1.2.2",
"@jambonz/mw-registrar": "^0.2.7",
"@jambonz/realtimedb-helpers": "^0.8.7",
"@jambonz/speech-utils": "^0.0.31",
"@jambonz/speech-utils": "^0.0.32",
"@jambonz/time-series": "^0.2.8",
"@jambonz/verb-specifications": "^0.0.45",
"@soniox/soniox-node": "^1.1.1",