mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2026-07-04 19:21:58 +00:00
fix app cannot set elevenlab tts (#386)
This commit is contained in:
@@ -161,7 +161,7 @@ export const SpeechProviderSelection = ({
|
||||
if (synthesisSupportedLanguagesAndVoices) {
|
||||
// Extract Voice
|
||||
const voicesOpts =
|
||||
synthesisSupportedLanguagesAndVoices.tts.find((lang) => {
|
||||
synthesisSupportedLanguagesAndVoices.tts?.find((lang) => {
|
||||
if (synthVendor === VENDOR_ELEVENLABS && lang.voices.length > 0) {
|
||||
return true;
|
||||
}
|
||||
@@ -227,12 +227,7 @@ export const SpeechProviderSelection = ({
|
||||
// Samve Voices applied to all languages
|
||||
// Voices are only available for the 1st language.
|
||||
setSynthLang(ELEVENLABS_LANG_EN);
|
||||
const newLang = json.tts.find(
|
||||
(lang) => lang.value === ELEVENLABS_LANG_EN
|
||||
);
|
||||
if (newLang) {
|
||||
setSynthVoice(newLang.voices[0].value);
|
||||
}
|
||||
setSynthVoice(json.tts[0].voices[0].value);
|
||||
return;
|
||||
}
|
||||
if (synthVendor === VENDOR_WHISPER) {
|
||||
|
||||
Reference in New Issue
Block a user