fix elevenlabs set voice (#353)

This commit is contained in:
Hoan Luu Huu authored and GitHub committed 2023-11-21 08:27:47 -06:00
1 parent 7ec8065977
commit 42af4f6243
1 file changed
+3 -4
@@ -233,11 +233,10 @@ export const SpeechProviderSelection = ({
}
if (vendor === VENDOR_ELEVENLABS) {
const newLang = synthesis[vendor].find(
(lang) => lang.code === ELEVENLABS_LANG_EN
);
// Samve Voices applied to all languages
// Voices are only available for the 1st language.
setSynthLang(ELEVENLABS_LANG_EN);
setSynthVoice(newLang!.voices[0].value);
setSynthVoice(synthesis[vendor][0].voices[0].value);
return;
}