update to latest speech-utils (#639)

This commit is contained in:
Dave Horton
2024-02-08 15:54:45 -05:00
committed by GitHub
parent 9f9a9ec598
commit 9c33a790bd
4 changed files with 19 additions and 13 deletions

View File

@@ -269,7 +269,11 @@ class TaskSay extends Task {
await this.playToConfMember(this.ep, memberId, confName, confUuid, filepath[segment]);
}
else {
this.logger.debug(`Say:exec sending ${filepath[segment].substring(0, 64)}`);
if (filepath[segment].startsWith('say:{')) {
const arr = /^say:\{.*\}\s*(.*)$/.exec(filepath[segment]);
if (arr) this.logger.debug(`Say:exec sending streaming tts request: ${arr[1].substring(0, 64)}..`);
}
else this.logger.debug(`Say:exec sending ${filepath[segment].substring(0, 64)}`);
this.ep.once('playback-start', (evt) => {
this.logger.debug({evt}, 'got playback-start');
if (this.otelSpan) {
@@ -303,6 +307,10 @@ class TaskSay extends Task {
}
});
await ep.play(filepath[segment]);
if (filepath[segment].startsWith('say:{')) {
const arr = /^say:\{.*\}\s*(.*)$/.exec(filepath[segment]);
if (arr) this.logger.debug(`Say:exec complete playing streaming tts request: ${arr[1].substring(0, 64)}..`);
}
this.logger.debug(`Say:exec completed play file ${filepath[segment]}`);
}
segment++;

14
package-lock.json generated
View File

@@ -15,7 +15,7 @@
"@jambonz/http-health-check": "^0.0.1",
"@jambonz/mw-registrar": "^0.2.4",
"@jambonz/realtimedb-helpers": "^0.8.7",
"@jambonz/speech-utils": "^0.0.38",
"@jambonz/speech-utils": "^0.0.39",
"@jambonz/stats-collector": "^0.1.9",
"@jambonz/time-series": "^0.2.8",
"@jambonz/verb-specifications": "^0.0.52",
@@ -3468,9 +3468,9 @@
}
},
"node_modules/@jambonz/speech-utils": {
"version": "0.0.38",
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.0.38.tgz",
"integrity": "sha512-NubkF114O03Jft0nqVGp28jAjwIM7BYIa3C33L/7sy42SHqzSMCkg8VZG7bXBmgGjM0PlNQT6ClMbEbsXIqTeA==",
"version": "0.0.39",
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.0.39.tgz",
"integrity": "sha512-WwYE3ItQC2kV36nNZW1VE17FxaOhCWl5O153gy2qUxZYlwtHcnnhnU/5HBqEMyf45pNIAMDeeVrkBBWnq3H41Q==",
"dependencies": {
"@aws-sdk/client-polly": "^3.496.0",
"@aws-sdk/client-sts": "^3.496.0",
@@ -14112,9 +14112,9 @@
}
},
"@jambonz/speech-utils": {
"version": "0.0.38",
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.0.38.tgz",
"integrity": "sha512-NubkF114O03Jft0nqVGp28jAjwIM7BYIa3C33L/7sy42SHqzSMCkg8VZG7bXBmgGjM0PlNQT6ClMbEbsXIqTeA==",
"version": "0.0.39",
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.0.39.tgz",
"integrity": "sha512-WwYE3ItQC2kV36nNZW1VE17FxaOhCWl5O153gy2qUxZYlwtHcnnhnU/5HBqEMyf45pNIAMDeeVrkBBWnq3H41Q==",
"requires": {
"@aws-sdk/client-polly": "^3.496.0",
"@aws-sdk/client-sts": "^3.496.0",

View File

@@ -31,7 +31,7 @@
"@jambonz/http-health-check": "^0.0.1",
"@jambonz/mw-registrar": "^0.2.4",
"@jambonz/realtimedb-helpers": "^0.8.7",
"@jambonz/speech-utils": "^0.0.38",
"@jambonz/speech-utils": "^0.0.39",
"@jambonz/stats-collector": "^0.1.9",
"@jambonz/time-series": "^0.2.8",
"@jambonz/verb-specifications": "^0.0.52",

View File

@@ -347,8 +347,7 @@ test('\'transcribe\' test - deepgram config options altLanguages', async(t) => {
"en-US"
],
"deepgramOptions": {
"model": "2-ea",
"tier": "nova",
"model": "nova-2",
"numerals": true,
"ner": true,
"vadTurnoff": 10,
@@ -408,8 +407,7 @@ test('\'transcribe\' test - deepgram config options altLanguages', async(t) => {
"en-US"
],
"deepgramOptions": {
"model": "2-ea",
"tier": "nova",
"model": "nova-2",
"numerals": true,
"ner": true,
"vadTurnoff": 10,