[GH-ISSUE #5146] Connections: first-class audio provider type (speech, sound effects, music) #2845

Closed
opened 2026-10-21 05:56:45 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kolacheee on GitHub (Aug 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5146

Originally assigned to: @kolacheee on GitHub.

The problem

Audio is the only media type without a real connection. Text, image, and video providers are Connections — per-profile keys, per-game selection, capability detection. Audio lives in a singleton TTS settings blob (GET /api/tts/config, source ∈ openai | elevenlabs | pockettts | xai, keys inside): one global configuration for the whole instance, invisible to the connections UI, impossible to select per game or per agent, and unusable as a capability gate for setup-wizard features. The generated music & sound effects wizard toggle (#5145) stalled on exactly this — its only possible gate was "what does the global TTS blob say," which is a workaround, not a model.

The ask

Introduce audio connections as a first-class provider type in the Connections model:

  • An audio connection declares sub-capabilities — speech (TTS), soundEffects, music — because providers differ: ElevenLabs does all three, OpenAI/PocketTTS/xai are speech-only, and future music-first providers may do only music. Capability gating (wizard toggles, agent settings) should ask "is there a connection that can generate music," not "is the source ElevenLabs."
  • Audio connections appear on the Connections page like every other provider profile: named profiles, provider presets for the four known sources, key storage handled the same way other connection keys are.
  • Consumers resolve through connections: the TTS speak/game-audio routes and the dialogue speaker flow accept an audio connection id (falling back to the legacy TTS settings blob so nothing breaks), and game setup can carry a per-game audio connection the way it carries gmConnectionId and the scene-effects connection.
  • Migration: on first boot after upgrade, a configured legacy TTS blob is converted into an equivalent audio connection (the blob stays as a read-only fallback until removed in a later release).

Scope note

Phase 1 is the model + UI + resolution path + migration. It deliberately does not redesign what game music generation produces — that revisit (persistent per-context tracks instead of per-turn mood clips) is planned separately once this lands, per the discussion on #5145.

Acceptance

  • Two audio profiles (say, two ElevenLabs accounts) can exist side by side, and a game can pick one.
  • A wizard feature can ask "does any connection provide music?" and gray itself out with an explanation when none does.
  • Existing TTS users upgrade without touching anything and their speech/game-audio keeps working.
Originally created by @kolacheee on GitHub (Aug 16, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5146 Originally assigned to: @kolacheee on GitHub. ### The problem Audio is the only media type without a real connection. Text, image, and video providers are Connections — per-profile keys, per-game selection, capability detection. Audio lives in a singleton TTS settings blob (`GET /api/tts/config`, source ∈ openai | elevenlabs | pockettts | xai, keys inside): one global configuration for the whole instance, invisible to the connections UI, impossible to select per game or per agent, and unusable as a capability gate for setup-wizard features. The generated music & sound effects wizard toggle (#5145) stalled on exactly this — its only possible gate was "what does the global TTS blob say," which is a workaround, not a model. ### The ask Introduce **audio connections** as a first-class provider type in the Connections model: - An audio connection declares **sub-capabilities** — `speech` (TTS), `soundEffects`, `music` — because providers differ: ElevenLabs does all three, OpenAI/PocketTTS/xai are speech-only, and future music-first providers may do only music. Capability gating (wizard toggles, agent settings) should ask "is there a connection that can generate music," not "is the source ElevenLabs." - Audio connections appear on the **Connections** page like every other provider profile: named profiles, provider presets for the four known sources, key storage handled the same way other connection keys are. - Consumers resolve through connections: the TTS speak/game-audio routes and the dialogue speaker flow accept an audio connection id (falling back to the legacy TTS settings blob so nothing breaks), and game setup can carry a per-game audio connection the way it carries `gmConnectionId` and the scene-effects connection. - Migration: on first boot after upgrade, a configured legacy TTS blob is converted into an equivalent audio connection (the blob stays as a read-only fallback until removed in a later release). ### Scope note Phase 1 is the model + UI + resolution path + migration. It deliberately does **not** redesign what game music generation produces — that revisit (persistent per-context tracks instead of per-turn mood clips) is planned separately once this lands, per the discussion on #5145. ### Acceptance - Two audio profiles (say, two ElevenLabs accounts) can exist side by side, and a game can pick one. - A wizard feature can ask "does any connection provide `music`?" and gray itself out with an explanation when none does. - Existing TTS users upgrade without touching anything and their speech/game-audio keeps working.
bsakaguchi 2026-10-21 05:56:45 +07:00
Author
Owner

@kolacheee commented on GitHub (Aug 16, 2026):

Implementation in progress by @kolacheee (agent-assisted) — draft PR #5152 is up: audio provider type through shared/schema/DB, TTS resolution seam with legacy-blob fallback, one-time boot migration, connection editor/panel surfaces, and the Game Setup wizard audio picker with per-game sfx/music toggles. Music-generation redesign (per-map / per-enemy-tier tracks) stays separate per the plan recorded on #5145.

<!-- gh-comment-id:5308880301 --> @kolacheee commented on GitHub (Aug 16, 2026): Implementation in progress by @kolacheee (agent-assisted) — draft PR #5152 is up: audio provider type through shared/schema/DB, TTS resolution seam with legacy-blob fallback, one-time boot migration, connection editor/panel surfaces, and the Game Setup wizard audio picker with per-game sfx/music toggles. Music-generation redesign (per-map / per-enemy-tier tracks) stays separate per the plan recorded on #5145.
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#2845
No description provided.