bugfix: unnecessary call to stopTranscription in gather verb when only collecting digits

This commit is contained in:
Dave Horton
2022-09-30 10:27:33 +01:00
parent c2c8f00978
commit 218f2d6c67

View File

@@ -641,7 +641,7 @@ class TaskGather extends Task {
}
this.span.setAttributes({'stt.resolve': reason, 'stt.result': JSON.stringify(evt)});
if (this.ep && this.ep.connected) {
if (this.needsStt && this.ep && this.ep.connected) {
this.ep.stopTranscription({vendor: this.vendor})
.catch((err) => this.logger.error({err}, 'Error stopping transcription'));
}