fix deepgram tts default model and update stt languages (#370)

This commit is contained in:
Hoan Luu Huu
2023-12-27 06:48:59 +07:00
committed by GitHub
parent 2f2e58e180
commit 1c16d707ca
2 changed files with 25 additions and 5 deletions
@@ -97,10 +97,11 @@ export const SpeechProviderSelection = ({
useEffect(() => {
currentVendor.current = synthVendor;
if (!synthesis || synthVendor.startsWith("custom:")) {
return;
}
if (synthVendor === VENDOR_DEEPGRAM) {
if (
!synthesis ||
synthVendor.startsWith("custom:") ||
synthVendor === VENDOR_DEEPGRAM
) {
return;
}
const voiceOpts = synthesis[synthVendor as keyof SynthesisVendors]
@@ -230,7 +231,10 @@ export const SpeechProviderSelection = ({
/** DEEPGRAM only support voice */
if (vendor.toString().startsWith(VENDOR_DEEPGRAM)) {
setSynthVoice("");
if (ttsModels) {
setSynthVoice(ttsModels[VENDOR_DEEPGRAM][0].value);
}
return;
}
@@ -121,6 +121,22 @@ export const languages: Language[] = [
name: "Ukrainian - general",
code: "uk",
},
{
name: "Flemish - general",
code: "nl-BE",
},
{
name: "Danish - general",
code: "da",
},
{
name: "Tamil - general",
code: "ta",
},
{
name: "Tamasheq - general",
code: "taq",
},
];
export default languages;