diff --git a/apps/web/src/pages/voices/components/TtsModal.tsx b/apps/web/src/pages/voices/components/TtsModal.tsx index 953792f43..3ad346162 100755 --- a/apps/web/src/pages/voices/components/TtsModal.tsx +++ b/apps/web/src/pages/voices/components/TtsModal.tsx @@ -34,9 +34,10 @@ const TtsModal: React.FC = ({ onSave, }) => { // 预置音色(含空默认)仅支持 zh/en;克隆音色支持全语言列表 + const clonedList = clonedVoices ?? [] const isCloneVoice = useMemo( - () => !!ttsVoiceId && clonedVoices.some((v) => v.id === ttsVoiceId), - [ttsVoiceId, clonedVoices], + () => !!ttsVoiceId && clonedList.some((v) => v.id === ttsVoiceId), + [ttsVoiceId, clonedList], ) const languageOptions = isCloneVoice ? CLONE_TTS_LANGUAGE_OPTIONS : PRESET_TTS_LANGUAGE_OPTIONS