[PR #4151] [MERGED] Fix ElevenLabs voice discovery and TTS pickers #6252

Closed
opened 2026-10-23 04:08:38 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4151
Author: @SpicyMarinara
Created: 7/26/2026
Status: ✅ Merged
Merged: 7/26/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/elevenlabs-voice-discovery


📝 Commits (4)

  • bb20625 Start ElevenLabs voice discovery fix
  • 478de3e fix: decode ElevenLabs responses and polish pickers
  • f59cc36 Merge remote-tracking branch 'origin/staging' into fix/elevenlabs-voice-discovery
  • 9e78d65 fix: address ElevenLabs review feedback

📊 Changes

5 files changed (+532 additions, -187 deletions)

View changed files

📝 e2e/core-flows.e2e.ts (+103 -66)
📝 packages/client/src/components/panels/settings/TTSConfigCard.tsx (+295 -96)
📝 packages/client/src/localization/locales/en.json (+2 -0)
📝 packages/server/src/routes/tts.routes.ts (+49 -21)
📝 scripts/regressions/tts-source-persistence.regression.ts (+83 -4)

📄 Description

Linked issue

Closes #4150

Why this change

ElevenLabs preview failures could expose compressed response bytes as unreadable text. Account voice discovery could also appear to load only defaults, and the per-character assignment controls were inconsistent and cramped for larger libraries.

Root cause

  • The ElevenLabs TTS, voice, model, and game-audio requests did not opt into compressed-response decoding.
  • Voice discovery needed to paginate the current v2 endpoint and merge the complete catalog with the saved voice collection.
  • The character selector still used a native select, while the voice popover was positioned and sized inside a narrow assignment column.

What changed

  • Decode compressed ElevenLabs success and error responses, including readable provider details for 401 failures.
  • Fetch every /v2/voices page and merge the unfiltered catalog with voice_type=saved, deduplicating overlapping entries.
  • Guard against repeated pagination tokens and retain readable provider errors in the client.
  • Use one localized searchable picker treatment for characters and voices.
  • Render picker menus in a viewport-safe portal with a visible scrollbar and a practical minimum width.
  • Add regression coverage for pagination, saved custom voices, gzip-compressed 401 responses, and the picker layout.

Automated validation run

  • pnpm check
  • pnpm regression:tts
  • pnpm exec playwright test -c playwright.config.ts -g "ElevenLabs keeps models visible" --project=desktop-chromium
  • git diff --check

One unrelated existing lint warning remains in packages/client/src/components/noodle/NoodleHome.tsx for a missing localizeUi hook dependency.

Manual verification

  • Preview speech with a valid ElevenLabs key and a saved custom voice.
  • Preview speech with an invalid or restricted ElevenLabs key and confirm the error is readable.
  • Verify a large voice library in single and per-character modes.
  • Verify character and voice menus in light and dark themes and on a narrow viewport.

Documentation and release impact

No user documentation or release metadata changes are required. The new picker copy is localized through the canonical English catalog, with normal fallback behavior for partial community locales.

Summary by CodeRabbit

  • New Features

    • Added searchable voice and character selectors in TTS settings.
    • Added per-character voice assignment with improved character selection.
    • Voice discovery now includes all available ElevenLabs voice categories.
  • Bug Fixes

    • Improved handling of voice and model refresh failures with more informative error messages.
    • Improved dropdown positioning, scrolling, and overlay behavior.
    • Added clearer messaging when character searches return no matches.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4151 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/26/2026 **Status:** ✅ Merged **Merged:** 7/26/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/elevenlabs-voice-discovery` --- ### 📝 Commits (4) - [`bb20625`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bb2062595e47b988c1de2eded9385c8bb914c0ae) Start ElevenLabs voice discovery fix - [`478de3e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/478de3eefd26da4023aa1e0685b4c96be54ee8c8) fix: decode ElevenLabs responses and polish pickers - [`f59cc36`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f59cc36e8d9edc63e11ac9e247ce3a5b55febd11) Merge remote-tracking branch 'origin/staging' into fix/elevenlabs-voice-discovery - [`9e78d65`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9e78d65bbc470caa86c0b724e3d643f637265b0a) fix: address ElevenLabs review feedback ### 📊 Changes **5 files changed** (+532 additions, -187 deletions) <details> <summary>View changed files</summary> 📝 `e2e/core-flows.e2e.ts` (+103 -66) 📝 `packages/client/src/components/panels/settings/TTSConfigCard.tsx` (+295 -96) 📝 `packages/client/src/localization/locales/en.json` (+2 -0) 📝 `packages/server/src/routes/tts.routes.ts` (+49 -21) 📝 `scripts/regressions/tts-source-persistence.regression.ts` (+83 -4) </details> ### 📄 Description ## Linked issue Closes #4150 ## Why this change ElevenLabs preview failures could expose compressed response bytes as unreadable text. Account voice discovery could also appear to load only defaults, and the per-character assignment controls were inconsistent and cramped for larger libraries. ## Root cause - The ElevenLabs TTS, voice, model, and game-audio requests did not opt into compressed-response decoding. - Voice discovery needed to paginate the current v2 endpoint and merge the complete catalog with the saved voice collection. - The character selector still used a native select, while the voice popover was positioned and sized inside a narrow assignment column. ## What changed - Decode compressed ElevenLabs success and error responses, including readable provider details for 401 failures. - Fetch every `/v2/voices` page and merge the unfiltered catalog with `voice_type=saved`, deduplicating overlapping entries. - Guard against repeated pagination tokens and retain readable provider errors in the client. - Use one localized searchable picker treatment for characters and voices. - Render picker menus in a viewport-safe portal with a visible scrollbar and a practical minimum width. - Add regression coverage for pagination, saved custom voices, gzip-compressed 401 responses, and the picker layout. ## Automated validation run - `pnpm check` - `pnpm regression:tts` - `pnpm exec playwright test -c playwright.config.ts -g "ElevenLabs keeps models visible" --project=desktop-chromium` - `git diff --check` One unrelated existing lint warning remains in `packages/client/src/components/noodle/NoodleHome.tsx` for a missing `localizeUi` hook dependency. ## Manual verification - [ ] Preview speech with a valid ElevenLabs key and a saved custom voice. - [ ] Preview speech with an invalid or restricted ElevenLabs key and confirm the error is readable. - [ ] Verify a large voice library in single and per-character modes. - [ ] Verify character and voice menus in light and dark themes and on a narrow viewport. ## Documentation and release impact No user documentation or release metadata changes are required. The new picker copy is localized through the canonical English catalog, with normal fallback behavior for partial community locales. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added searchable voice and character selectors in TTS settings. * Added per-character voice assignment with improved character selection. * Voice discovery now includes all available ElevenLabs voice categories. * **Bug Fixes** * Improved handling of voice and model refresh failures with more informative error messages. * Improved dropdown positioning, scrolling, and overlay behavior. * Added clearer messaging when character searches return no matches. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:08:38 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6252
No description provided.