From 4e2feda7f3e3b32f607432d7c83579027fd8f972 Mon Sep 17 00:00:00 2001 From: akirilyuk Date: Thu, 3 Feb 2022 18:29:48 +0100 Subject: [PATCH] wait before killing gather --- lib/tasks/gather.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index e0c61289..a264842f 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -105,11 +105,13 @@ class TaskGather extends Task { if (err) return this.logger.error({err}, 'Gather:exec Error playing tts'); this.logger.debug('Gather: say task completed'); if (!this.killed) { - //if (this.listenAfterSpeech) { + if (this.listenAfterSpeech) { startListening(cs, ep); - // } else { - // this.kill(cs); - //} + } else { + setTimeout(()=>{ + this.kill(cs); + },1000) + } } }); }