diff --git a/src/containers/internal/views/applications/speech-selection.tsx b/src/containers/internal/views/applications/speech-selection.tsx index b6a29b7..eb2ed6b 100644 --- a/src/containers/internal/views/applications/speech-selection.tsx +++ b/src/containers/internal/views/applications/speech-selection.tsx @@ -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) {