From 1c16d707caac478ac8163436137cc5ce9fe375ba Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Wed, 27 Dec 2023 06:48:59 +0700 Subject: [PATCH] fix deepgram tts default model and update stt languages (#370) --- .../views/applications/speech-selection.tsx | 14 +++++++++----- .../deepgram-speech-recognizer-lang.ts | 16 ++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/containers/internal/views/applications/speech-selection.tsx b/src/containers/internal/views/applications/speech-selection.tsx index 50d32ac..498a2c0 100644 --- a/src/containers/internal/views/applications/speech-selection.tsx +++ b/src/containers/internal/views/applications/speech-selection.tsx @@ -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; } diff --git a/src/vendor/speech-recognizer/deepgram-speech-recognizer-lang.ts b/src/vendor/speech-recognizer/deepgram-speech-recognizer-lang.ts index 24baa4a..d5ee72d 100644 --- a/src/vendor/speech-recognizer/deepgram-speech-recognizer-lang.ts +++ b/src/vendor/speech-recognizer/deepgram-speech-recognizer-lang.ts @@ -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;