[GH-ISSUE #1131] TTS voice list: pass the configured model to OpenAI-compatible provider voices endpoint #559

Closed
opened 2026-10-20 17:30:11 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @etherious1804 on GitHub (May 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1131

Originally assigned to: @cha1latte on GitHub.

Problem

When the TTS source is openai but the baseUrl points at a local or third-party OpenAI-compatible TTS server (e.g. mlx-audio, openedai-speech, LocalAI), the voice dropdown silently falls back to OpenAI's hardcoded 9 voices instead of showing what the configured server actually supports.

Root cause

fetchProviderVoices in packages/server/src/routes/tts.routes.ts already fetches ${base}/audio/voices for the openai source and falls back gracefully on 404. But it does not pass the configured model as a query parameter.

Multi-model OAI-compatible TTS servers cannot know which voice catalog to return without that hint. mlx-audio in particular can host Kokoro (54 voices), Higgs Audio (3 sample voices + reference cloning), Chatterbox, etc. side-by-side — each with very different catalogs. Without ?model=, those servers either 400 the request or return the wrong list.

The result: even if your local server has the right endpoint, Marinara won't show the voices, so per-character voice mode (voiceMode: "per-character") is effectively unusable against a local TTS server — users can only assign characters to OpenAI's 9 cloud voices.

Repro

  1. Configure TTS with source: openai, baseUrl: http://127.0.0.1:8081/v1, model: mlx-community/Kokoro-82M-bf16.
  2. Run an mlx-audio server with that model serving /v1/audio/voices?model=<id>.
  3. GET /api/tts/voices returns { fromProvider: false, voices: [alloy, ash, coral, ...] } — the OpenAI fallback, not the 54 Kokoro voices.

Proposed fix

Include cfg.model as a ?model= query param when fetching ${base}/audio/voices. Vanilla api.openai.com ignores unknown query params, so the change is safe for the default OpenAI endpoint. Local/multi-model servers can now disambiguate.

The fix is 4 lines, no behavior change for OpenAI-hosted users.

PR

I'll open a draft PR with the change linked to this issue.

Originally created by @etherious1804 on GitHub (May 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1131 Originally assigned to: @cha1latte on GitHub. ### Problem When the TTS source is `openai` but the `baseUrl` points at a local or third-party OpenAI-compatible TTS server (e.g. [mlx-audio](https://github.com/Blaizzy/mlx-audio), [openedai-speech](https://github.com/matatonic/openedai-speech), LocalAI), the voice dropdown silently falls back to OpenAI's hardcoded 9 voices instead of showing what the configured server actually supports. ### Root cause `fetchProviderVoices` in `packages/server/src/routes/tts.routes.ts` already fetches `${base}/audio/voices` for the openai source and falls back gracefully on 404. But it does **not** pass the configured model as a query parameter. Multi-model OAI-compatible TTS servers cannot know which voice catalog to return without that hint. mlx-audio in particular can host Kokoro (54 voices), Higgs Audio (3 sample voices + reference cloning), Chatterbox, etc. side-by-side — each with very different catalogs. Without `?model=`, those servers either 400 the request or return the wrong list. The result: even if your local server has the right endpoint, Marinara won't show the voices, so per-character voice mode (`voiceMode: "per-character"`) is effectively unusable against a local TTS server — users can only assign characters to OpenAI's 9 cloud voices. ### Repro 1. Configure TTS with `source: openai`, `baseUrl: http://127.0.0.1:8081/v1`, `model: mlx-community/Kokoro-82M-bf16`. 2. Run an mlx-audio server with that model serving `/v1/audio/voices?model=<id>`. 3. `GET /api/tts/voices` returns `{ fromProvider: false, voices: [alloy, ash, coral, ...] }` — the OpenAI fallback, not the 54 Kokoro voices. ### Proposed fix Include `cfg.model` as a `?model=` query param when fetching `${base}/audio/voices`. Vanilla `api.openai.com` ignores unknown query params, so the change is safe for the default OpenAI endpoint. Local/multi-model servers can now disambiguate. The fix is 4 lines, no behavior change for OpenAI-hosted users. ### PR I'll open a draft PR with the change linked to this issue.
bsakaguchi 2026-10-20 17:30:11 +07:00
Author
Owner

@cha1latte commented on GitHub (May 25, 2026):

Closed in #1207

<!-- gh-comment-id:4537134920 --> @cha1latte commented on GitHub (May 25, 2026): Closed in #1207
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#559
No description provided.