mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
fix(voice): auto-select first preset when mascot voice gender changes (#2764)
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user