Skip to content

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

Merged
M3gA-Mind merged 1 commit into
tinyhumansai:mainfrom
M3gA-Mind:fix/voice-gender-auto-select-preset
May 27, 2026
Merged

fix(voice): auto-select first preset when mascot voice gender changes#2764
M3gA-Mind merged 1 commit into
tinyhumansai:mainfrom
M3gA-Mind:fix/voice-gender-auto-select-preset

Conversation

@M3gA-Mind
Copy link
Copy Markdown
Contributor

@M3gA-Mind M3gA-Mind commented May 27, 2026

Summary

  • When the user selects a gender (Male/Female) in Mascot Settings → Voice, the voice preset now automatically switches to the first curated preset for that gender instead of keeping the previous gender's voice selected.
  • Male → defaults to George (first male preset, JBFqnCBsd6RMkjVDRZzb)
  • Female → defaults to Rachel (first female preset, 21m00Tcm4TlvDq8ikWAM)
  • Resets paste-mode and preview error state to keep the picker clean on gender switch.

Root cause: onGenderChange in MascotPanel.tsx only dispatched setMascotVoiceGender but never updated the voice ID, leaving the preset dropdown pointing at a voice from the previous gender.

Test plan

  • Open Settings → Mascot → Voice section
  • Select Male — verify preset dropdown switches to George (multilingual)
  • Select Female — verify preset dropdown switches to Rachel (US female)
  • Verify the preset dropdown updates immediately without requiring a page reload
  • Verify that switching gender while "Use locale default" is checked does not conflict (locale default toggle is unaffected)

Summary by CodeRabbit

  • New Features
    • Voice selection in mascot settings now automatically selects a compatible voice when you change the voice gender. This ensures your voice choice is always properly aligned with your selected gender, clears any previous preview issues, and maintains consistent selection throughout the configuration interface.

Review Change Stack

Switching gender in Mascot settings now immediately updates the voice
preset to the first curated preset for that gender, so the picker
always reflects a valid selection rather than carrying over a voice
from the previous gender.
@M3gA-Mind M3gA-Mind requested a review from a team May 27, 2026 13:44
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2dfb1395-588d-4cae-8602-bcaf089a0891

📥 Commits

Reviewing files that changed from the base of the PR and between 3573d3c and d40ceb8.

📒 Files selected for processing (1)
  • app/src/components/settings/panels/MascotPanel.tsx

📝 Walkthrough

Walkthrough

MascotPanel's voice gender change handler now automatically selects the first matching voice preset when the gender filter changes. This updates the voice selection draft, clears any preview errors, disables paste mode, and dispatches state to keep the controlled voice picker synchronized.

Changes

Mascot voice preset auto-selection

Layer / File(s) Summary
Preset auto-selection on gender change
app/src/components/settings/panels/MascotPanel.tsx
Voice gender change handler finds the first matching ELEVENLABS_VOICE_PRESETS entry for the selected gender, disables paste mode, clears preview errors, updates the voice draft, and dispatches setMascotVoiceId to synchronize the controlled picker.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • tinyhumansai/openhuman#1821: Both PRs update mascot voice selection logic by using ELEVENLABS_VOICE_PRESETS and dispatching setMascotVoiceId to synchronize voice id state across gender filtering and voice picker components.

Poem

🐰 A gender filter now finds voices so fine,
First matching preset makes selection align,
Draft updates swift, paste mode goes away,
State stays in sync—hooray, hooray, hooray!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: auto-selecting the first voice preset when the mascot voice gender changes. It directly relates to the primary fix in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

@M3gA-Mind M3gA-Mind merged commit fcb6dcf into tinyhumansai:main May 27, 2026
27 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant