This commit is contained in:
xquanluu
2025-12-17 15:28:29 +07:00
parent 922a034b2c
commit 647f4ab51c

View File

@@ -258,7 +258,8 @@ class TaskGather extends SttTask {
startDtmfListener(); startDtmfListener();
} }
this._stopVad(); this._stopVad();
if (!this.killed && !this.resolved && !this.listenDuringPrompt) { if (!this.killed && !this.resolved) {
if (!this.listenDuringPrompt) {
startListening(cs, ep); startListening(cs, ep);
} }
if (this.input.includes('speech') && this.vendor === 'nuance' && this.listenDuringPrompt) { if (this.input.includes('speech') && this.vendor === 'nuance' && this.listenDuringPrompt) {
@@ -267,6 +268,8 @@ class TaskGather extends SttTask {
if (err) this.logger.error({err}, 'Gather:exec - error starting transcription timers'); if (err) this.logger.error({err}, 'Gather:exec - error starting transcription timers');
}); });
} }
}
}; };
this.sayTask.span = span; this.sayTask.span = span;
this.sayTask.ctx = ctx; this.sayTask.ctx = ctx;
@@ -296,7 +299,8 @@ class TaskGather extends SttTask {
startDtmfListener(); startDtmfListener();
} }
this._stopVad(); this._stopVad();
if (!this.killed && !this.resolved && !this.listenDuringPrompt) { if (!this.killed && !this.resolved) {
if (!this.listenDuringPrompt) {
startListening(cs, ep); startListening(cs, ep);
} }
if (this.input.includes('speech') && this.vendor === 'nuance' && this.listenDuringPrompt) { if (this.input.includes('speech') && this.vendor === 'nuance' && this.listenDuringPrompt) {
@@ -305,6 +309,8 @@ class TaskGather extends SttTask {
if (err) this.logger.error({err}, 'Gather:exec - error starting transcription timers'); if (err) this.logger.error({err}, 'Gather:exec - error starting transcription timers');
}); });
} }
}
}; };
this.playTask.span = span; this.playTask.span = span;
this.playTask.ctx = ctx; this.playTask.ctx = ctx;