From 5bdee44eb7104152316f468854a30d8d8b8357d6 Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Wed, 27 Sep 2023 04:47:39 +0000 Subject: [PATCH] fix cobalt default language --- .../internal/views/applications/speech-selection.tsx | 5 +++++ src/vendor/index.tsx | 1 + 2 files changed, 6 insertions(+) diff --git a/src/containers/internal/views/applications/speech-selection.tsx b/src/containers/internal/views/applications/speech-selection.tsx index e2f3726..a36ca7f 100644 --- a/src/containers/internal/views/applications/speech-selection.tsx +++ b/src/containers/internal/views/applications/speech-selection.tsx @@ -3,6 +3,7 @@ import { SpeechCredential } from "src/api/types"; import { Selector } from "src/components/forms"; import { hasLength } from "src/utils"; import { + LANG_COBALT_EN_US, LANG_EN_US, LANG_EN_US_STANDARD_C, VENDOR_AWS, @@ -279,6 +280,10 @@ export const SpeechProviderSelection = ({ ) { setRecogLang(LANG_EN_US); } + // Default colbalt language + if (vendor === VENDOR_COBALT) { + setRecogLang(LANG_COBALT_EN_US); + } }} /> {hasLength(sttLabelOptions) && sttLabelOptions.length > 1 && ( diff --git a/src/vendor/index.tsx b/src/vendor/index.tsx index 5db95d1..28823c3 100644 --- a/src/vendor/index.tsx +++ b/src/vendor/index.tsx @@ -8,6 +8,7 @@ import type { } from "./types"; export const LANG_EN_US = "en-US"; +export const LANG_COBALT_EN_US = "en_US-8khz"; export const LANG_EN_US_STANDARD_C = "en-US-Standard-C"; export const VENDOR_GOOGLE = "google"; export const VENDOR_AWS = "aws";