From b43e4eb2577363ee32cd33ea95d2f1ed5168dcb5 Mon Sep 17 00:00:00 2001 From: xquanluu Date: Thu, 21 May 2026 10:13:34 +0700 Subject: [PATCH] wip --- lib/tasks/gather.js | 2 +- lib/tasks/stt-task.js | 4 ++++ lib/tasks/transcribe.js | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index 0659806d..24664cc1 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -1039,7 +1039,7 @@ class TaskGather extends SttTask { this.stt_latency_ms += `${sttLatency.stt_latency_ms},`; } - if (this.isContinuousAsr) { + if (this.isContinuousAsr && !this._vendorOwnsTurnTermination(this.vendor)) { /* append the transcript and start listening again for asrTimeout */ const t = evt.alternatives[0].transcript; if (t) { diff --git a/lib/tasks/stt-task.js b/lib/tasks/stt-task.js index ccf0da4c..024ff68e 100644 --- a/lib/tasks/stt-task.js +++ b/lib/tasks/stt-task.js @@ -430,6 +430,10 @@ class SttTask extends Task { ].includes(vendor)); } + _vendorOwnsTurnTermination(vendor) { + return vendor === 'houndify'; + } + /* Send Done to Houndify via FS API; FinalTranscript arrives via normal flow.*/ _sendHoundifyDone(ep, channel) { if (channel !== undefined) { diff --git a/lib/tasks/transcribe.js b/lib/tasks/transcribe.js index 30e6bc2a..5f1c0ae5 100644 --- a/lib/tasks/transcribe.js +++ b/lib/tasks/transcribe.js @@ -572,7 +572,8 @@ class TaskTranscribe extends SttTask { 'TaskGather:_onTranscription - got empty transcript from deepgram, return the buffered transcripts'); } } - if (this.isContinuousAsr) { + + if (this.isContinuousAsr && !this._vendorOwnsTurnTermination(this.vendor)) { /* append the transcript and start listening again for asrTimeout */ const t = evt.alternatives[0].transcript; if (t) {