feat/813 - notify speech-bargein-detected and dtmf-bargein-detected events (#823)

* feat/813 - notify speech-bargein-detected and dtmf-bargein-detected events

* fix for #826 race condition in say (#827)

* fix for #826 race condition in say

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update transcription-utils.js (#802)

* Check the confidence levels of a transcript  with minConfidence (#808)

* https://github.com/jambonz/jambonz-feature-server/issues/807

* feat/807: Using minConfidence from recognizer settings

* feat/807: new reason stt-min-confidence-error

* feat/807: sending stt-min-confidence instead of  stt-min-confidence-error

* feat/807: sending stt-low-confidence instead of  stt-min-confidence-error

* feat/807 - removed ? for this.data

* fix conference end is not sent when moderator leave conference (#825)

* fix conference end is not sent when moderator leave conference

* wip

* fix review comment

* feat/813: checking for playComplete before sending dtmf-bargein-detected event

* feat/813: added this.playComplete=true at the end of _killAudio method

* feat/813: removed empty line

* feat/813: removed nested if and added condition to main if

* feat/813: notifyStatus called when not playComplete

* feat/813: referring to time-series 0.2.9 version

* feat/813: generated package-lock.json

---------

Co-authored-by: Dave Horton <daveh@beachdognet.com>
Co-authored-by: Vinod Dharashive <vdharashive@gmail.com>
Co-authored-by: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com>
This commit is contained in:
rammohan-kore
2024-08-06 19:04:15 +05:30
committed by GitHub
parent 4259a24fa0
commit c2a1819cbb
3 changed files with 13 additions and 8 deletions

View File

@@ -322,6 +322,9 @@ class TaskGather extends SttTask {
clearTimeout(this.interDigitTimer);
let resolved = false;
if (this.dtmfBargein) {
if (!this.playComplete) {
this.notifyStatus({event: 'dtmf-bargein-detected', ...evt});
}
this._killAudio(cs);
this.emit('dtmf', evt);
}
@@ -700,6 +703,7 @@ class TaskGather extends SttTask {
this.playTask.kill(cs);
this.playTask = null;
}
this.playComplete = true;
}
_onTranscription(cs, ep, evt, fsEvent) {
@@ -863,6 +867,7 @@ class TaskGather extends SttTask {
if (!this.playComplete) {
this.logger.debug({transcript: evt.alternatives[0].transcript}, 'killing audio due to speech');
this.emit('vad');
this.notifyStatus({event: 'speech-bargein-detected', ...evt});
}
this._killAudio(cs);
}

14
package-lock.json generated
View File

@@ -17,7 +17,7 @@
"@jambonz/realtimedb-helpers": "^0.8.8",
"@jambonz/speech-utils": "^0.1.11",
"@jambonz/stats-collector": "^0.1.10",
"@jambonz/time-series": "^0.2.8",
"@jambonz/time-series": "^0.2.9",
"@jambonz/verb-specifications": "^0.0.74",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/exporter-jaeger": "^1.23.0",
@@ -1565,9 +1565,9 @@
}
},
"node_modules/@jambonz/time-series": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.8.tgz",
"integrity": "sha512-iFSKPAEElb3NXVAKYlr+2Q08zNhv8SlsS4I1Bwg4gFIj4Tku0vHzoXk6WTCzMRY1hE4YbBPbImNYLW9BfzMJjw==",
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.9.tgz",
"integrity": "sha512-+/Oal0mjjV4iQ8q0ymtvVJP+GqgGpYUb2bc/FD/xDxOzKtl340l9yoM3oczREJg5IvEkpExz6NogJzUiCSeVnQ==",
"dependencies": {
"debug": "^4.3.1",
"influx": "^5.9.3"
@@ -10521,9 +10521,9 @@
}
},
"@jambonz/time-series": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.8.tgz",
"integrity": "sha512-iFSKPAEElb3NXVAKYlr+2Q08zNhv8SlsS4I1Bwg4gFIj4Tku0vHzoXk6WTCzMRY1hE4YbBPbImNYLW9BfzMJjw==",
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/@jambonz/time-series/-/time-series-0.2.9.tgz",
"integrity": "sha512-+/Oal0mjjV4iQ8q0ymtvVJP+GqgGpYUb2bc/FD/xDxOzKtl340l9yoM3oczREJg5IvEkpExz6NogJzUiCSeVnQ==",
"requires": {
"debug": "^4.3.1",
"influx": "^5.9.3"

View File

@@ -33,7 +33,7 @@
"@jambonz/realtimedb-helpers": "^0.8.8",
"@jambonz/speech-utils": "^0.1.11",
"@jambonz/stats-collector": "^0.1.10",
"@jambonz/time-series": "^0.2.8",
"@jambonz/time-series": "^0.2.9",
"@jambonz/verb-specifications": "^0.0.74",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/exporter-jaeger": "^1.23.0",