fix(voice): auto-select first preset when mascot voice gender changes (#2764)

This commit is contained in:
Mega Mind
2026-05-27 19:16:12 +05:30
committed by GitHub
parent 3573d3c7cb
commit fcb6dcfeb3
@@ -215,6 +215,13 @@ const MascotPanel = () => {
const onGenderChange = (next: MascotVoiceGender) => {
dispatch(setMascotVoiceGender(next));
const firstPreset = ELEVENLABS_VOICE_PRESETS.find(p => p.gender === next);
if (firstPreset) {
setVoicePasteMode(false);
setVoicePreviewError(null);
setVoiceDraft(firstPreset.id);
dispatch(setMascotVoiceId(firstPreset.id));
}
};
const onLocaleDefaultToggle = (next: boolean) => {