From 28bf0d347787dca56fc77c9225a326dc41e22d4b Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Mon, 6 Oct 2025 16:50:20 -0400 Subject: [PATCH] send eager_eot events (#1382) --- lib/tasks/gather.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index 0352b0bf..9d88200e 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -914,7 +914,7 @@ class TaskGather extends SttTask { evt = this.normalizeTranscription(evt, this.vendor, 1, this.language, this.shortUtterance, this.data.recognizer.punctuation); - //this.logger.debug({evt, bugname, finished, vendor: this.vendor}, 'Gather:_onTranscription normalized transcript'); + this.logger.debug({evt, bugname, finished, vendor: this.vendor}, 'Gather:_onTranscription normalized transcript'); if (evt.alternatives.length === 0) { this.logger.info({evt}, 'TaskGather:_onTranscription - got empty transcript, continue listening'); @@ -1080,6 +1080,11 @@ class TaskGather extends SttTask { this.cs.requestor.request('verb:hook', this.partialResultHook, Object.assign({speech: evt}, this.cs.callInfo, httpHeaders)); } + else if (this.vendor === 'deepgramflux' && + ['EagerEndOfTurn', 'TurnResumed'].includes(evt.vendor.evt?.event)) { + this.logger.debug(`Gather:_onTranscription - deepgramflux event detected: ${evt.event}`); + this.performAction({speech: evt, reason: 'speechDetected'}, false); + } if (this.vendor === 'soniox') { if (evt.vendor.finalWords.length) { this.logger.debug({evt}, 'TaskGather:_onTranscription - buffering soniox transcript');