[GH-ISSUE #3381] [Feature]: Expose/export generated TTS clips — already persisted (IndexedDB) but unreachable #1828

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

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

Originally assigned to: @SpicyMarinara on GitHub.

What's being requested

Marinara already saves every generated TTS clip to disk (a persistent IndexedDB cache), but there's no UI to retrieve, replay, or export them — unlike generated images, which are both persisted and surfaced in a gallery. The request is a small export/download affordance (or an audio gallery) that reads the existing cache. No new persistence layer is needed — the storage is already there; only the surface is missing.

What's already in place (verified against source)

  • packages/client/src/lib/tts-audio-cache.ts maintains a persistent IndexedDB cache: DB marinara-tts-audio-cache, store voiceLines (+ a voiceLineMeta store), capped at 750 clips / 100 MB (lines 5-11), with LRU pruning (114-149). Every generated clip is written via putPersistentBlob (170-198) inside getOrCreateCachedTTSAudioBlob (212-265).
  • Both playback surfaces populate it — Conversation (ChatArea.tsx) and Game (GameNarration.tsx) — plus ChatMessage.tsx, GameCombatUI.tsx, and tts-dialogue.ts.
  • The server route packages/server/src/routes/tts.routes.ts is a pure streaming proxy — it stores only the TTS config / API key (parseStoredConfig), not audio. So persistence is entirely the client-side cache.
  • The cache exposes only key-based getters (getCachedTTSAudioBlob) — there is no enumeration/list/export API, and no consumer other than playback. So the clips sit on disk but are unreachable by the user.

Why

Generated media should be retrievable. Images already are (persisted + gallery). TTS clips are persisted the same way but have no surface — the gap is the missing UI, not missing storage.

Suggested approach

Add a list/enumeration helper to tts-audio-cache.ts (iterate the voiceLines / voiceLineMeta store) and a small UI that plays and exports from the existing cache — a download/export button on a played clip, and/or an audio gallery mirroring the image gallery. Optionally associate clips with their message/speaker for labeling. No changes to how clips are generated or stored are required.


AI-investigated against the current tree; the IndexedDB cache, its write sites, the key-only getters, and the proxy-only server route were all read and confirmed. Filed as an enhancement per the reporter's framing.

Originally created by @kolacheee on GitHub (Jul 8, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3381 Originally assigned to: @SpicyMarinara on GitHub. **What's being requested** Marinara already saves every generated TTS clip to disk (a persistent IndexedDB cache), but there's no UI to retrieve, replay, or export them — unlike generated **images**, which are both persisted *and* surfaced in a gallery. The request is a small export/download affordance (or an audio gallery) that reads the existing cache. No new persistence layer is needed — the storage is already there; only the surface is missing. **What's already in place (verified against source)** - `packages/client/src/lib/tts-audio-cache.ts` maintains a **persistent IndexedDB cache**: DB `marinara-tts-audio-cache`, store `voiceLines` (+ a `voiceLineMeta` store), capped at **750 clips / 100 MB** (lines 5-11), with LRU pruning (114-149). Every generated clip is written via `putPersistentBlob` (170-198) inside `getOrCreateCachedTTSAudioBlob` (212-265). - Both playback surfaces populate it — Conversation (`ChatArea.tsx`) and Game (`GameNarration.tsx`) — plus `ChatMessage.tsx`, `GameCombatUI.tsx`, and `tts-dialogue.ts`. - The server route `packages/server/src/routes/tts.routes.ts` is a pure streaming proxy — it stores only the TTS config / API key (`parseStoredConfig`), **not** audio. So persistence is entirely the client-side cache. - The cache exposes only **key-based getters** (`getCachedTTSAudioBlob`) — there is no enumeration/list/export API, and no consumer other than playback. So the clips sit on disk but are unreachable by the user. **Why** Generated media should be retrievable. Images already are (persisted + gallery). TTS clips are persisted the same way but have no surface — the gap is the missing UI, not missing storage. **Suggested approach** Add a list/enumeration helper to `tts-audio-cache.ts` (iterate the `voiceLines` / `voiceLineMeta` store) and a small UI that plays and exports from the existing cache — a download/export button on a played clip, and/or an audio gallery mirroring the image gallery. Optionally associate clips with their message/speaker for labeling. No changes to how clips are generated or stored are required. --- *AI-investigated against the current tree; the IndexedDB cache, its write sites, the key-only getters, and the proxy-only server route were all read and confirmed. Filed as an enhancement per the reporter's framing.*
bsakaguchi 2026-10-21 05:43:03 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jul 8, 2026):

Addressed in #3388 and merged to staging.

<!-- gh-comment-id:4918159235 --> @SpicyMarinara commented on GitHub (Jul 8, 2026): Addressed in #3388 and merged to staging.
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#1828
No description provided.