mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 17:17:58 +00:00
try something else
This commit is contained in:
@@ -25,8 +25,7 @@ class TaskGather extends Task {
|
||||
this.minBargeinWordCount = this.data.minBargeinWordCount || 1;
|
||||
// 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.listenAfterSpeech = this.data.listenAfterSpeech === false;
|
||||
this.timeout = (this.timeout || 15) * 1000;
|
||||
this.timeout = this.data.listenAfterSpeech === false ? 0 : (this.timeout || 15) * 1000;
|
||||
this.interim = this.partialResultCallback || this.bargein;
|
||||
if (this.data.recognizer) {
|
||||
const recognizer = this.data.recognizer;
|
||||
@@ -105,13 +104,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);
|
||||
},1000)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user