mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1132] [CLOSED] feat(tts): pass model to provider voices endpoint #4938
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4938
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1132
Author: @etherious1804
Created: 5/24/2026
Status: ❌ Closed
Base:
staging← Head:feat/tts-voices-pass-model📝 Commits (1)
5461c08feat(tts): pass model to provider voices endpoint📊 Changes
1 file changed (+8 additions, -1 deletions)
View changed files
📝
packages/server/src/routes/tts.routes.ts(+8 -1)📄 Description
Linked issue
Closes #1131
Why this change
When the TTS source is
openaibut thebaseUrlpoints at a local or third-party OpenAI-compatible TTS server (mlx-audio, openedai-speech, LocalAI, etc.), Marinara's voice dropdown silently falls back to OpenAI's hardcoded 9 voices instead of showing what the configured server actually supports.Root cause:
fetchProviderVoicesalready calls${base}/audio/voicesand falls back gracefully on 404 — but it doesn't pass the configured model as a query param. Multi-model OAI-compatible TTS servers can't return the right voice catalog without that hint, so they 400 or return the wrong list, and Marinara falls back to the hardcoded OpenAI nine.Concrete impact: per-character voice mode (
voiceMode: "per-character") is effectively unusable against a local TTS server today — users can only assign characters to the 9 cloud voices Marinara hardcodes for the openai source.What changed
packages/server/src/routes/tts.routes.ts— 8 lines added infetchProviderVoices:?model=${cfg.model}when a model is configured.api.openai.comignores unknown query params, so default OpenAI users see zero behavior change.No new dependencies. No client changes — the existing voice fetch path picks up the richer list automatically.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Verified end-to-end against a local mlx-audio server (Kokoro 82M) at
http://127.0.0.1:8081/v1:pnpm checkran cleanly (TS + ESLint + build, exit code 0). The only WARN lines are the pre-existingUnsupported enginenotes for node 26 vs>=24 <26— unrelated to this change.GET /api/tts/voicesreturned{ fromProvider: false, voices: [alloy, ash, coral, echo, fable, nova, onyx, sage, shimmer] }— the OpenAI hardcoded fallback.{ fromProvider: true, voices: <54 Kokoro voice ids> }— the 28 English voices (af_*,am_*,bf_*,bm_*) plus the 26 non-English ones (if_*,zf_*, etc.).POST /api/tts/speakwithvoice: "bm_george"(a voice that wasn't previously visible) returned a valid mp3 and played correctly through afplay.modelto a non-existent value against api.openai.com — the request still goes through, OpenAI ignores the extra param). UI dropdown should populate from the provider rather than fall back. Per-character voice assignment should now show the full provider catalog.Docs and release impact
No docs need touching — the existing behavior is documented as "Marinara queries the provider for its voice list" and that's still what happens. This makes the existing query actually work for multi-model providers.
UI evidence (if applicable)
No UI code changed. The existing voice picker (
packages/client/src/components/panels/settings/TTSConfigCard.tsx) reads from/api/tts/voicesand renders whatever it gets — so the dropdown automatically shows the new richer list. No screenshots attached because the visible change is just "more entries in the dropdown."🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.