fix listen after speech

This commit is contained in:
akirilyuk
2022-02-04 08:31:14 +01:00
parent 60d7f0f31c
commit c36b55303a

View File

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