mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-19 04:17:44 +00:00
update to latest speech-utils (#639)
This commit is contained in:
@@ -269,7 +269,11 @@ class TaskSay extends Task {
|
|||||||
await this.playToConfMember(this.ep, memberId, confName, confUuid, filepath[segment]);
|
await this.playToConfMember(this.ep, memberId, confName, confUuid, filepath[segment]);
|
||||||
}
|
}
|
||||||
else {
|
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.ep.once('playback-start', (evt) => {
|
||||||
this.logger.debug({evt}, 'got playback-start');
|
this.logger.debug({evt}, 'got playback-start');
|
||||||
if (this.otelSpan) {
|
if (this.otelSpan) {
|
||||||
@@ -303,6 +307,10 @@ class TaskSay extends Task {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
await ep.play(filepath[segment]);
|
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]}`);
|
this.logger.debug(`Say:exec completed play file ${filepath[segment]}`);
|
||||||
}
|
}
|
||||||
segment++;
|
segment++;
|
||||||
|
|||||||
14
package-lock.json
generated
14
package-lock.json
generated
@@ -15,7 +15,7 @@
|
|||||||
"@jambonz/http-health-check": "^0.0.1",
|
"@jambonz/http-health-check": "^0.0.1",
|
||||||
"@jambonz/mw-registrar": "^0.2.4",
|
"@jambonz/mw-registrar": "^0.2.4",
|
||||||
"@jambonz/realtimedb-helpers": "^0.8.7",
|
"@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/stats-collector": "^0.1.9",
|
||||||
"@jambonz/time-series": "^0.2.8",
|
"@jambonz/time-series": "^0.2.8",
|
||||||
"@jambonz/verb-specifications": "^0.0.52",
|
"@jambonz/verb-specifications": "^0.0.52",
|
||||||
@@ -3468,9 +3468,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jambonz/speech-utils": {
|
"node_modules/@jambonz/speech-utils": {
|
||||||
"version": "0.0.38",
|
"version": "0.0.39",
|
||||||
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.0.38.tgz",
|
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.0.39.tgz",
|
||||||
"integrity": "sha512-NubkF114O03Jft0nqVGp28jAjwIM7BYIa3C33L/7sy42SHqzSMCkg8VZG7bXBmgGjM0PlNQT6ClMbEbsXIqTeA==",
|
"integrity": "sha512-WwYE3ItQC2kV36nNZW1VE17FxaOhCWl5O153gy2qUxZYlwtHcnnhnU/5HBqEMyf45pNIAMDeeVrkBBWnq3H41Q==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-polly": "^3.496.0",
|
"@aws-sdk/client-polly": "^3.496.0",
|
||||||
"@aws-sdk/client-sts": "^3.496.0",
|
"@aws-sdk/client-sts": "^3.496.0",
|
||||||
@@ -14112,9 +14112,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@jambonz/speech-utils": {
|
"@jambonz/speech-utils": {
|
||||||
"version": "0.0.38",
|
"version": "0.0.39",
|
||||||
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.0.38.tgz",
|
"resolved": "https://registry.npmjs.org/@jambonz/speech-utils/-/speech-utils-0.0.39.tgz",
|
||||||
"integrity": "sha512-NubkF114O03Jft0nqVGp28jAjwIM7BYIa3C33L/7sy42SHqzSMCkg8VZG7bXBmgGjM0PlNQT6ClMbEbsXIqTeA==",
|
"integrity": "sha512-WwYE3ItQC2kV36nNZW1VE17FxaOhCWl5O153gy2qUxZYlwtHcnnhnU/5HBqEMyf45pNIAMDeeVrkBBWnq3H41Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@aws-sdk/client-polly": "^3.496.0",
|
"@aws-sdk/client-polly": "^3.496.0",
|
||||||
"@aws-sdk/client-sts": "^3.496.0",
|
"@aws-sdk/client-sts": "^3.496.0",
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
"@jambonz/http-health-check": "^0.0.1",
|
"@jambonz/http-health-check": "^0.0.1",
|
||||||
"@jambonz/mw-registrar": "^0.2.4",
|
"@jambonz/mw-registrar": "^0.2.4",
|
||||||
"@jambonz/realtimedb-helpers": "^0.8.7",
|
"@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/stats-collector": "^0.1.9",
|
||||||
"@jambonz/time-series": "^0.2.8",
|
"@jambonz/time-series": "^0.2.8",
|
||||||
"@jambonz/verb-specifications": "^0.0.52",
|
"@jambonz/verb-specifications": "^0.0.52",
|
||||||
|
|||||||
@@ -347,8 +347,7 @@ test('\'transcribe\' test - deepgram config options altLanguages', async(t) => {
|
|||||||
"en-US"
|
"en-US"
|
||||||
],
|
],
|
||||||
"deepgramOptions": {
|
"deepgramOptions": {
|
||||||
"model": "2-ea",
|
"model": "nova-2",
|
||||||
"tier": "nova",
|
|
||||||
"numerals": true,
|
"numerals": true,
|
||||||
"ner": true,
|
"ner": true,
|
||||||
"vadTurnoff": 10,
|
"vadTurnoff": 10,
|
||||||
@@ -408,8 +407,7 @@ test('\'transcribe\' test - deepgram config options altLanguages', async(t) => {
|
|||||||
"en-US"
|
"en-US"
|
||||||
],
|
],
|
||||||
"deepgramOptions": {
|
"deepgramOptions": {
|
||||||
"model": "2-ea",
|
"model": "nova-2",
|
||||||
"tier": "nova",
|
|
||||||
"numerals": true,
|
"numerals": true,
|
||||||
"ner": true,
|
"ner": true,
|
||||||
"vadTurnoff": 10,
|
"vadTurnoff": 10,
|
||||||
|
|||||||
Reference in New Issue
Block a user