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) {