From c36b55303a62a1a444b5bdb204fce4e10ea60390 Mon Sep 17 00:00:00 2001 From: akirilyuk Date: Fri, 4 Feb 2022 08:31:14 +0100 Subject: [PATCH] fix listen after speech --- lib/tasks/gather.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index 3fe2b297..57796d78 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -26,7 +26,7 @@ class TaskGather extends Task { // this is specially for barge in where we want to make a bargebale promt // to a user without listening after the say task has finished this.logger.debug({opts}, 'created gather task'); - this.listenAfterSpeech = this.data.listenAfterSpeech === false; + this.listenAfterSpeech = typeof this.data.listenAfterSpeech === "boolean" ? this.data.listenAfterSpeech : true; this.timeout = (this.timeout || 15) * 1000; this.interim = this.partialResultCallback || this.bargein; if (this.data.recognizer) {