[PR #715] [MERGED] Add TTS playback controls #4743

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/715
Author: @cha1latte
Created: 5/11/2026
Status: ✅ Merged
Merged: 5/11/2026
Merged by: @cha1latte

Base: main ← Head: feat/issue-695-tts-playback-controls


📝 Commits (3)

  • f5d4eeb Add TTS playback controls
  • 43014bb Add TTS playback control evidence
  • 1566658 Update TTS playback control evidence

📊 Changes

9 files changed (+407 additions, -101 deletions)

View changed files

➕ docs/pr-evidence/issue-695/tts-initial.png (+0 -0)
➕ docs/pr-evidence/issue-695/tts-paused.png (+0 -0)
➕ docs/pr-evidence/issue-695/tts-playing.png (+0 -0)
➕ docs/pr-evidence/issue-695/tts-restarted.png (+0 -0)
➕ docs/pr-evidence/issue-695/tts-stopped.png (+0 -0)
📝 packages/client/src/components/chat/ChatMessage.tsx (+121 -50)
📝 packages/client/src/components/game/GameCombatUI.tsx (+110 -2)
📝 packages/client/src/components/game/GameNarration.tsx (+139 -48)
📝 packages/client/src/lib/tts-service.ts (+37 -1)

📄 Description

Linked issue

Closes #695

Why this change

  • TTS playback only had play/stop behavior, so users could not pause, resume, or restart spoken output without stopping and starting over manually.

What changed

  • Added a paused state plus pause, resume, and restart methods to the shared client TTS service.
  • Added pause/resume and restart controls to conversation and roleplay message TTS actions.
  • Added matching voice-over controls for Game Mode narration segments.
  • Added compact play/pause/resume/restart/stop controls for combat voice-over playback.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Codex validation passed in split form because sandboxed pnpm check child-process spawning timed out/failed under the default sandbox:
    • pnpm impeccable:check passed.
    • pnpm -r run lint passed.
    • pnpm build passed.
  • Focused browser verification passed against the real ChatMessage component and tts-service using a local harness:
    • Speak button appeared for a TTS-enabled assistant message.
    • Clicking Speak started playback and revealed Pause, Restart, and Stop.
    • Pause changed the control to Resume and audio time stopped advancing.
    • Resume restarted time advancement.
    • Restart reset playback near 0.
    • Stop returned the UI to Speak and revoked the object URL.
  • Full app-shell Game Mode narration/combat controls were compile/build validated, but not manually clicked in a running game session during this pass.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

No docs or release metadata changes were needed; this is a client UI/control behavior change.

UI evidence (if applicable)

Initial TTS-enabled message:

Initial TTS message

Playback controls visible after Speak:

TTS playback controls

Paused state changed Pause to Resume:

TTS paused resume control

Playback after Restart:

TTS restarted state

Stopped state returned to Speak:

TTS stopped state


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/715 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/11/2026 **Status:** ✅ Merged **Merged:** 5/11/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `main` ← **Head:** `feat/issue-695-tts-playback-controls` --- ### 📝 Commits (3) - [`f5d4eeb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f5d4eebd55c118f7afbfa77db45a85f5a7f044cb) Add TTS playback controls - [`43014bb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/43014bb67712a9a64b3e64cc4283286e1b6bf1bb) Add TTS playback control evidence - [`1566658`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1566658600391d928d498ef5121caca47077b4c1) Update TTS playback control evidence ### 📊 Changes **9 files changed** (+407 additions, -101 deletions) <details> <summary>View changed files</summary> ➕ `docs/pr-evidence/issue-695/tts-initial.png` (+0 -0) ➕ `docs/pr-evidence/issue-695/tts-paused.png` (+0 -0) ➕ `docs/pr-evidence/issue-695/tts-playing.png` (+0 -0) ➕ `docs/pr-evidence/issue-695/tts-restarted.png` (+0 -0) ➕ `docs/pr-evidence/issue-695/tts-stopped.png` (+0 -0) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+121 -50) 📝 `packages/client/src/components/game/GameCombatUI.tsx` (+110 -2) 📝 `packages/client/src/components/game/GameNarration.tsx` (+139 -48) 📝 `packages/client/src/lib/tts-service.ts` (+37 -1) </details> ### 📄 Description ## Linked issue Closes #695 ## Why this change - TTS playback only had play/stop behavior, so users could not pause, resume, or restart spoken output without stopping and starting over manually. ## What changed - Added a paused state plus pause, resume, and restart methods to the shared client TTS service. - Added pause/resume and restart controls to conversation and roleplay message TTS actions. - Added matching voice-over controls for Game Mode narration segments. - Added compact play/pause/resume/restart/stop controls for combat voice-over playback. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Codex validation passed in split form because sandboxed `pnpm check` child-process spawning timed out/failed under the default sandbox: - `pnpm impeccable:check` passed. - `pnpm -r run lint` passed. - `pnpm build` passed. - Focused browser verification passed against the real `ChatMessage` component and `tts-service` using a local harness: - Speak button appeared for a TTS-enabled assistant message. - Clicking Speak started playback and revealed Pause, Restart, and Stop. - Pause changed the control to Resume and audio time stopped advancing. - Resume restarted time advancement. - Restart reset playback near `0`. - Stop returned the UI to Speak and revoked the object URL. - Full app-shell Game Mode narration/combat controls were compile/build validated, but not manually clicked in a running game session during this pass. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) No docs or release metadata changes were needed; this is a client UI/control behavior change. ## UI evidence (if applicable) Initial TTS-enabled message: ![Initial TTS message](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/1566658600391d928d498ef5121caca47077b4c1/docs/pr-evidence/issue-695/tts-initial.png) Playback controls visible after Speak: ![TTS playback controls](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/1566658600391d928d498ef5121caca47077b4c1/docs/pr-evidence/issue-695/tts-playing.png) Paused state changed Pause to Resume: ![TTS paused resume control](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/1566658600391d928d498ef5121caca47077b4c1/docs/pr-evidence/issue-695/tts-paused.png) Playback after Restart: ![TTS restarted state](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/1566658600391d928d498ef5121caca47077b4c1/docs/pr-evidence/issue-695/tts-restarted.png) Stopped state returned to Speak: ![TTS stopped state](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/1566658600391d928d498ef5121caca47077b4c1/docs/pr-evidence/issue-695/tts-stopped.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:10:17 +07:00
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#4743
No description provided.