mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user