diff --git a/src/containers/internal/views/applications/speech-selection.tsx b/src/containers/internal/views/applications/speech-selection.tsx index 498a2c0..d303c3f 100644 --- a/src/containers/internal/views/applications/speech-selection.tsx +++ b/src/containers/internal/views/applications/speech-selection.tsx @@ -202,6 +202,15 @@ export const SpeechProviderSelection = ({ ); } }, [synthVendor, synthLabel, credentials]); + + useEffect(() => { + if (!synthLabel && ttsLabelOptions?.length > 0) { + setSynthLabel(ttsLabelOptions[0].value); + } + if (!recogLabel && sttLabelOptions?.length > 0) { + setRecogLabel(sttLabelOptions[0].value); + } + }, [ttsLabelOptions, sttLabelOptions]); return ( <> {synthesis && ( @@ -283,7 +292,7 @@ export const SpeechProviderSelection = ({ setSynthVoice(newLang!.voices[0].value); }} /> - {hasLength(ttsLabelOptions) && ttsLabelOptions.length > 1 && ( + {hasLength(ttsLabelOptions) && ( <> - {hasLength(sttLabelOptions) && sttLabelOptions.length > 1 && ( + {hasLength(sttLabelOptions) && ( <>