From d9025fb845130921ccdecedecf46419535d36d1c Mon Sep 17 00:00:00 2001 From: Quan HL Date: Fri, 7 Feb 2025 13:26:20 +0700 Subject: [PATCH] rime labs support new voices --- .../internal/views/applications/speech-selection.tsx | 7 +++++++ src/vendor/types.ts | 1 + 2 files changed, 8 insertions(+) diff --git a/src/containers/internal/views/applications/speech-selection.tsx b/src/containers/internal/views/applications/speech-selection.tsx index 0b5cd6a..5635448 100644 --- a/src/containers/internal/views/applications/speech-selection.tsx +++ b/src/containers/internal/views/applications/speech-selection.tsx @@ -32,6 +32,7 @@ import { VENDOR_PLAYHT, VENDOR_CARTESIA, VENDOR_VOXIST, + VENDOR_RIMELABS, } from "src/vendor"; import { LabelOptions, @@ -292,6 +293,12 @@ export const SpeechProviderSelection = ({ updateTtsVoice(newLang!.voices[0].value); return; } + if (synthVendor === VENDOR_RIMELABS) { + const newLang = json.tts.find((lang) => lang.value === "eng"); + setSynthLang(newLang!.value); + updateTtsVoice(newLang!.voices[0].value); + return; + } /** Google and AWS have different language lists */ /** If the new language doesn't map then default to "en-US" */ let newLang = json.tts.find((lang) => lang.value === synthLang); diff --git a/src/vendor/types.ts b/src/vendor/types.ts index 901d225..075d1e7 100644 --- a/src/vendor/types.ts +++ b/src/vendor/types.ts @@ -110,6 +110,7 @@ export interface SynthesisVendors { deepgram: VoiceLanguage[]; playht: VoiceLanguage[]; cartesia: VoiceLanguage[]; + rimelabs: VoiceLanguage[]; } export interface MSRawSpeech {