[GH-ISSUE #7967] [Feature]: Let Game music / sound effects use a non-ElevenLabs audio connection (OpenAI-compatible music or sfx endpoints, e.g. ACE-Step) #4373

Closed
opened 2026-10-22 04:06:07 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @fishy1boy13 on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7967

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

Game Mode's generated music and sound effects only work with the ElevenLabs audio source. POST /api/tts/game-audio in packages/server/src/routes/tts.routes.ts returns "ElevenLabs game <sfx|music> generation is not enabled" for any other source, and the generation call itself goes straight to ElevenLabs' /v1/music and /v1/sound-generation. The "Game sound effects" and "Game music" switches only appear for the ElevenLabs source.

Audio connections (#5146 / #5152) were designed so capability gating asks "is there a connection that can generate music", and #5146 explicitly mentions future music-first providers. In the current code the audio source enum is still openai | elevenlabs | pockettts | xai, and only ElevenLabs implements soundEffects and music.

I run a self-hosted setup with an OpenAI-compatible provider (Infermatic) that serves a music model (ACE-Step 1.5 XL Turbo) next to a TTS model (Kokoro). Speech works through the OpenAI-compatible source, but there is no way to point Game music at the music model without an ElevenLabs account.

Proposed solution

  • Declare sub-capabilities (speech, soundEffects, music) per audio connection or source, as proposed in #5146, instead of hard-coding source === "elevenlabs" in the game-audio route.
  • Add a generic "music / sound-effect generation" path for an OpenAI-compatible-style audio connection: a configurable endpoint and model, a prompt in, and an audio file out. This could be a new source such as "Custom music endpoint" or optional music/sfx fields on the OpenAI-compatible source.
  • Show the "Game sound effects" / "Game music" switches for any connection that declares those capabilities, not only ElevenLabs.
  • Keep the current context-track behaviour (composed once per area or tier, then reused), so output length and cost stay bounded.

Alternatives considered

  • Patching the server locally: this works but conflicts with updates on every git pull.
  • Using ElevenLabs: it works today but needs a separate paid account, and I already have a music model on my existing provider.

Additional context

  • Marinara Engine v2.5.0, staging branch.
  • Related: #5146, #5152 (first-class audio connections).
  • I haven't verified what the music endpoint returns (format, length), so the generic path may need a configurable response format.
Originally created by @fishy1boy13 on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7967 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? Game Mode's generated music and sound effects only work with the **ElevenLabs** audio source. `POST /api/tts/game-audio` in `packages/server/src/routes/tts.routes.ts` returns "ElevenLabs game <sfx|music> generation is not enabled" for any other source, and the generation call itself goes straight to ElevenLabs' `/v1/music` and `/v1/sound-generation`. The "Game sound effects" and "Game music" switches only appear for the ElevenLabs source. Audio connections (#5146 / #5152) were designed so capability gating asks "is there a connection that can generate music", and #5146 explicitly mentions future music-first providers. In the current code the audio source enum is still `openai | elevenlabs | pockettts | xai`, and only ElevenLabs implements `soundEffects` and `music`. I run a self-hosted setup with an OpenAI-compatible provider (Infermatic) that serves a music model (ACE-Step 1.5 XL Turbo) next to a TTS model (Kokoro). Speech works through the OpenAI-compatible source, but there is no way to point Game music at the music model without an ElevenLabs account. ## Proposed solution - Declare sub-capabilities (`speech`, `soundEffects`, `music`) per audio connection or source, as proposed in #5146, instead of hard-coding `source === "elevenlabs"` in the game-audio route. - Add a generic "music / sound-effect generation" path for an OpenAI-compatible-style audio connection: a configurable endpoint and model, a prompt in, and an audio file out. This could be a new source such as "Custom music endpoint" or optional music/sfx fields on the OpenAI-compatible source. - Show the "Game sound effects" / "Game music" switches for any connection that declares those capabilities, not only ElevenLabs. - Keep the current context-track behaviour (composed once per area or tier, then reused), so output length and cost stay bounded. ## Alternatives considered - Patching the server locally: this works but conflicts with updates on every `git pull`. - Using ElevenLabs: it works today but needs a separate paid account, and I already have a music model on my existing provider. ## Additional context - Marinara Engine v2.5.0, staging branch. - Related: #5146, #5152 (first-class audio connections). - I haven't verified what the music endpoint returns (format, length), so the generic path may need a configurable response format.
bsakaguchi 2026-10-24 04:03:36 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Oct 21, 2026):

Codex is handling this issue in the maintainer's assigned-issue sweep, on fix/assigned-issue-sweep-20261022, targeting staging. Existing contributor PRs are excluded from this sweep. Ownership: @SpicyMarinara, assisted by Codex.

<!-- gh-comment-id:6327666995 --> @SpicyMarinara commented on GitHub (Oct 21, 2026): Codex is handling this issue in the maintainer's assigned-issue sweep, on `fix/assigned-issue-sweep-20261022`, targeting `staging`. Existing contributor PRs are excluded from this sweep. Ownership: @SpicyMarinara, assisted by Codex.
Author
Owner

@SpicyMarinara commented on GitHub (Oct 21, 2026):

Implemented in #8027 and merged into staging at 4d67fe75b3. Reviewed-head and merge ancestry are verified.

The existing OpenAI-compatible Audio source now supports explicitly configured music/SFX capabilities and relative endpoints, with binary MP3 or ACE-Step-compatible inline audio contracts. Game setup/playback, context caching, retries and connection transfer use those capabilities. No provider entry was added. Real-route/local-HTTP regressions passed; live Infermatic-specific compatibility remains limited to the documented contracts. Guide translations are tracked by #8029.

Final PR-head validation passed all eight required checks, 973/973 Node regressions and all ten platform checks; review findings were fixed or resolved with documented reasons. Closing as completed.

<!-- gh-comment-id:6328921216 --> @SpicyMarinara commented on GitHub (Oct 21, 2026): Implemented in #8027 and merged into `staging` at [4d67fe75b3](https://github.com/Pasta-Devs/Marinara-Engine/commit/4d67fe75b31b5fc97649ba340cb69832822395de). Reviewed-head and merge ancestry are verified. The existing OpenAI-compatible Audio source now supports explicitly configured music/SFX capabilities and relative endpoints, with binary MP3 or ACE-Step-compatible inline audio contracts. Game setup/playback, context caching, retries and connection transfer use those capabilities. No provider entry was added. Real-route/local-HTTP regressions passed; live Infermatic-specific compatibility remains limited to the documented contracts. Guide translations are tracked by #8029. Final PR-head validation passed all eight required checks, 973/973 Node regressions and all ten platform checks; review findings were fixed or resolved with documented reasons. Closing as completed.
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#4373
No description provided.