From 1fd94dce945fe0b523704ce59cc80a207974f4f0 Mon Sep 17 00:00:00 2001 From: akirilyuk Date: Thu, 3 Feb 2022 18:54:57 +0100 Subject: [PATCH] start listeing if enabled --- lib/tasks/gather.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index fbe850ea..aceb5d02 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -105,14 +105,9 @@ 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) { - startListening(cs, ep); - // } else { - // setTimeout(()=>{ - // this.kill(cs); - // },2000) - - // } + if(this.listenAfterSpeech){ + startListening(cs, ep); + } } }); } @@ -121,11 +116,7 @@ class TaskGather extends Task { this.playTask.on('playDone', async(err) => { if (err) return this.logger.error({err}, 'Gather:exec Error playing url'); if (!this.killed) { - if (this.listenAfterSpeech) { startListening(cs, ep); - } else { - this.kill(cs); - } }} ); }