From 68827112fcbcf2ab4612d02a4e0ab15ed17d0eec Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Thu, 23 Feb 2023 13:10:46 -0500 Subject: [PATCH] further fix for early hints match in gather --- lib/tasks/gather.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index 9c948442..46f88272 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -534,7 +534,8 @@ class TaskGather extends Task { if (this.earlyHintsMatch && evt.is_final === false) { const transcript = evt.alternatives[0].transcript?.toLowerCase(); - if (this.hints.find((h) => h.toLowerCase() === transcript)) { + const hints = this.data.recognizer?.hints || []; + if (hints.find((h) => h.toLowerCase() === transcript)) { this.logger.debug({evt}, 'Gather:_onTranscription: early hint match'); this._resolve('speech', evt); return;