From 1b5b37184b3ddd969d422751c3580b32d7e0f46b Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Thu, 19 Jan 2023 09:47:42 -0500 Subject: [PATCH] bugfix #223: early hints should not be enabled with continuous asr is used in gather --- lib/tasks/gather.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index 24fb0fd4..0b705c07 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -141,6 +141,14 @@ class TaskGather extends Task { asrDtmfTerminationDigit: this.asrDtmfTerminationDigit }, 'Gather:exec - enabling continuous ASR since it is turned on for the session'); } + if (process.env.JAMBONZ_GATHER_EARLY_HINTS_MATCH && + !this.isContinuousAsr && + this.hints.length > 0 && this.hints.length <= 10) { + this.earlyHintsMatch = true; + this.interim = true; + this.logger.debug('Gather:exec - early hints match enabled'); + } + this.ep = ep; if ('default' === this.vendor || !this.vendor) { this.vendor = cs.speechRecognizerVendor;