diff --git a/lib/tasks/transcribe.js b/lib/tasks/transcribe.js index 8001c569..5dcd40d0 100644 --- a/lib/tasks/transcribe.js +++ b/lib/tasks/transcribe.js @@ -429,9 +429,13 @@ class TaskTranscribe extends SttTask { /* here is where we return a final transcript */ this.logger.debug({evt}, 'TaskTranscribe:_onTranscription - sending final transcript'); this._resolve(channel, evt); + /* some STT engines will keep listening after a final response, so no need to restart */ - if (!['soniox', 'aws', 'microsoft', 'deepgram', 'google'] - .includes(this.vendor)) this._startTranscribing(cs, ep, channel); + if (!['soniox', 'aws', 'microsoft', 'deepgram', 'google'].includes(this.vendor) && + !this.vendor.startsWith('custom:')) { + this.logger.debug('TaskTranscribe:_onTranscription - restarting transcribe'); + this._startTranscribing(cs, ep, channel); + } } } else {