mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
Fix for issue where we should not delay from gather when JAMBONES_TRANSCRIBE_EP_DESTROY_DELAY_MS is set (#1283)
* Fix for issue https://github.com/jambonz/jambonz-feature-server/issues/1281 * Commented the reason for the change
This commit is contained in:
@@ -390,9 +390,13 @@ class TaskGather extends SttTask {
|
||||
if (this.digitBuffer.length === 0 && this.needsStt) {
|
||||
// DTMF is higher priority than STT.
|
||||
this.removeCustomEventListeners();
|
||||
// Fix for https://github.com/jambonz/jambonz-feature-server/issues/1281
|
||||
// We should immediately call stop transcription from gather
|
||||
// so that next gather can start transcription immediately
|
||||
ep.stopTranscription({
|
||||
vendor: this.vendor,
|
||||
bugname: this.bugname,
|
||||
gracefulShutdown: false
|
||||
})
|
||||
.catch((err) => this.logger.error({err},
|
||||
` Received DTMF, Error stopping transcription for vendor ${this.vendor}`));
|
||||
@@ -1236,9 +1240,13 @@ class TaskGather extends SttTask {
|
||||
async _resolve(reason, evt) {
|
||||
this.logger.info({evt}, `TaskGather:resolve with reason ${reason}`);
|
||||
if (this.needsStt && this.ep && this.ep.connected) {
|
||||
// Fix for https://github.com/jambonz/jambonz-feature-server/issues/1281
|
||||
// We should immediately call stop transcription from gather
|
||||
// so that next gather can start transcription immediately
|
||||
this.ep.stopTranscription({
|
||||
vendor: this.vendor,
|
||||
bugname: this.bugname
|
||||
bugname: this.bugname,
|
||||
gracefulShutdown: false
|
||||
})
|
||||
.catch((err) => {
|
||||
if (this.resolved) return;
|
||||
|
||||
Reference in New Issue
Block a user