From ae9386791fb81aadc58da801405cd7e4106ca121 Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Tue, 26 Sep 2023 18:41:43 +0700 Subject: [PATCH] fix cobalt model (#469) --- lib/tasks/gather.js | 4 ++++ lib/tasks/transcribe.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index c6f4e538..e05c66f6 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -178,6 +178,10 @@ class TaskGather extends SttTask { if (!this.data.recognizer.vendor) { this.data.recognizer.vendor = this.vendor; } + if (this.vendor === 'cobalt' && !this.data.recognizer.model) { + // By default, application saves cobalt model in language + this.data.recognizer.model = cs.speechRecognizerLanguage; + } if (this.needsStt && !this.sttCredentials) { try { diff --git a/lib/tasks/transcribe.js b/lib/tasks/transcribe.js index 1d1ec1d0..4e87810d 100644 --- a/lib/tasks/transcribe.js +++ b/lib/tasks/transcribe.js @@ -91,6 +91,10 @@ class TaskTranscribe extends SttTask { if (!this.data.recognizer.vendor) { this.data.recognizer.vendor = this.vendor; } + if (this.vendor === 'cobalt' && !this.data.recognizer.model) { + // By default, application saves cobalt model in language + this.data.recognizer.model = cs.speechRecognizerLanguage; + } if (!this.sttCredentials) { try {