fix cobalt default language

This commit is contained in:
Hoan Luu Huu
2023-09-27 04:47:39 +00:00
parent b5c27bb096
commit 5bdee44eb7
2 changed files with 6 additions and 0 deletions

View File

@@ -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 && (

View File

@@ -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";