further fix for early hints match in gather

This commit is contained in:
Dave Horton
2023-02-23 13:10:46 -05:00
parent 8a9a2df128
commit 68827112fc

View File

@@ -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;