diff --git a/lib/tasks/transcribe.js b/lib/tasks/transcribe.js index 754dbc908..2b51f6af9 100644 --- a/lib/tasks/transcribe.js +++ b/lib/tasks/transcribe.js @@ -142,7 +142,7 @@ class TaskTranscribe extends SttTask { const opts = this.setChannelVarsForStt(this, this.sttCredentials, this.data.recognizer); switch (this.vendor) { case 'google': - bugname = `${this.bugname_prefix}google_transcribe_${channel}`; + bugname = `${this.bugname_prefix}google_transcribe`; this.addCustomEventListener(ep, GoogleTranscriptionEvents.Transcription, this._onTranscription.bind(this, cs, ep, channel)); this.addCustomEventListener(ep, GoogleTranscriptionEvents.NoAudioDetected, @@ -153,7 +153,7 @@ class TaskTranscribe extends SttTask { case 'aws': case 'polly': - bugname = `${this.bugname_prefix}aws_transcribe_${channel}`; + bugname = `${this.bugname_prefix}aws_transcribe`; this.addCustomEventListener(ep, AwsTranscriptionEvents.Transcription, this._onTranscription.bind(this, cs, ep, channel)); this.addCustomEventListener(ep, AwsTranscriptionEvents.NoAudioDetected, @@ -162,19 +162,19 @@ class TaskTranscribe extends SttTask { this._onMaxDurationExceeded.bind(this, cs, ep, channel)); break; case 'microsoft': - bugname = `${this.bugname_prefix}azure_transcribe_${channel}`; + bugname = `${this.bugname_prefix}azure_transcribe`; this.addCustomEventListener(ep, AzureTranscriptionEvents.Transcription, this._onTranscription.bind(this, cs, ep, channel)); this.addCustomEventListener(ep, AzureTranscriptionEvents.NoSpeechDetected, this._onNoAudio.bind(this, cs, ep, channel)); break; case 'nuance': - bugname = `${this.bugname_prefix}nuance_transcribe_${channel}`; + bugname = `${this.bugname_prefix}nuance_transcribe`; this.addCustomEventListener(ep, NuanceTranscriptionEvents.Transcription, this._onTranscription.bind(this, cs, ep, channel)); break; case 'deepgram': - bugname = `${this.bugname_prefix}deepgram_transcribe_${channel}`; + bugname = `${this.bugname_prefix}deepgram_transcribe`; this.addCustomEventListener(ep, DeepgramTranscriptionEvents.Transcription, this._onTranscription.bind(this, cs, ep, channel)); this.addCustomEventListener(ep, DeepgramTranscriptionEvents.Connect, @@ -187,12 +187,12 @@ class TaskTranscribe extends SttTask { break; case 'soniox': - bugname = `${this.bugname_prefix}soniox_transcribe_${channel}`; + bugname = `${this.bugname_prefix}soniox_transcribe`; this.addCustomEventListener(ep, SonioxTranscriptionEvents.Transcription, this._onTranscription.bind(this, cs, ep, channel)); break; case 'cobalt': - bugname = `${this.bugname_prefix}cobalt_transcribe_${channel}`; + bugname = `${this.bugname_prefix}cobalt_transcribe`; this.addCustomEventListener(ep, CobaltTranscriptionEvents.Transcription, this._onTranscription.bind(this, cs, ep, channel)); @@ -222,7 +222,7 @@ class TaskTranscribe extends SttTask { break; case 'ibm': - bugname = `${this.bugname_prefix}ibm_transcribe_${channel}`; + bugname = `${this.bugname_prefix}ibm_transcribe`; this.addCustomEventListener(ep, IbmTranscriptionEvents.Transcription, this._onTranscription.bind(this, cs, ep, channel)); this.addCustomEventListener(ep, IbmTranscriptionEvents.Connect, @@ -232,13 +232,13 @@ class TaskTranscribe extends SttTask { break; case 'nvidia': - bugname = `${this.bugname_prefix}nvidia_transcribe_${channel}`; + bugname = `${this.bugname_prefix}nvidia_transcribe`; this.addCustomEventListener(ep, NvidiaTranscriptionEvents.Transcription, this._onTranscription.bind(this, cs, ep, channel)); break; case 'assemblyai': - bugname = `${this.bugname_prefix}assemblyai_transcribe_${channel}`; + bugname = `${this.bugname_prefix}assemblyai_transcribe`; this.addCustomEventListener(ep, AssemblyAiTranscriptionEvents.Transcription, this._onTranscription.bind(this, cs, ep, channel)); this.addCustomEventListener(ep, @@ -250,7 +250,7 @@ class TaskTranscribe extends SttTask { default: if (this.vendor.startsWith('custom:')) { - bugname = `${this.bugname_prefix}${this.vendor}_transcribe_${channel}`; + bugname = `${this.bugname_prefix}${this.vendor}_transcribe`; this.addCustomEventListener(ep, JambonzTranscriptionEvents.Transcription, this._onTranscription.bind(this, cs, ep, channel)); this.addCustomEventListener(ep, JambonzTranscriptionEvents.Connect, this._onVendorConnect.bind(this, cs, ep)); @@ -265,7 +265,7 @@ class TaskTranscribe extends SttTask { } } // save dedicated bugname for each endpoint - ep.transcribe_bugname = bugname; + ep.transcribe_bugname = `${bugname}_${Date.now()}`; /* common handler for all stt engine errors */ this.addCustomEventListener(ep, JambonzTranscriptionEvents.Error, this._onJambonzError.bind(this, cs, ep)); await ep.set(opts)