rime labs support new voices

This commit is contained in:
Quan HL
2025-02-07 13:26:20 +07:00
parent c237b7e7f2
commit d9025fb845
2 changed files with 8 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ import {
VENDOR_PLAYHT, VENDOR_PLAYHT,
VENDOR_CARTESIA, VENDOR_CARTESIA,
VENDOR_VOXIST, VENDOR_VOXIST,
VENDOR_RIMELABS,
} from "src/vendor"; } from "src/vendor";
import { import {
LabelOptions, LabelOptions,
@@ -292,6 +293,12 @@ export const SpeechProviderSelection = ({
updateTtsVoice(newLang!.voices[0].value); updateTtsVoice(newLang!.voices[0].value);
return; 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 */ /** Google and AWS have different language lists */
/** If the new language doesn't map then default to "en-US" */ /** If the new language doesn't map then default to "en-US" */
let newLang = json.tts.find((lang) => lang.value === synthLang); let newLang = json.tts.find((lang) => lang.value === synthLang);

1
src/vendor/types.ts vendored
View File

@@ -110,6 +110,7 @@ export interface SynthesisVendors {
deepgram: VoiceLanguage[]; deepgram: VoiceLanguage[];
playht: VoiceLanguage[]; playht: VoiceLanguage[];
cartesia: VoiceLanguage[]; cartesia: VoiceLanguage[];
rimelabs: VoiceLanguage[];
} }
export interface MSRawSpeech { export interface MSRawSpeech {