[PR #1414] [CLOSED] Restore TTS audio format config #5079

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1414
Author: @cha1latte
Created: 5/27/2026
Status: ❌ Closed

Base: refactor ← Head: fix/refactor-issue-1360-tts-audio-format


📝 Commits (1)

  • f50dbf9 Restore TTS audio format config

📊 Changes

5 files changed (+170 additions, -2 deletions)

View changed files

📝 src-tauri/src/commands/storage/integrations/tts.rs (+127 -1)
📝 src/engine/contracts/types/tts.ts (+4 -0)
📝 src/features/modes/shared/chat-ui/hooks/use-streaming-tts.test.tsx (+1 -0)
📝 src/features/shell/settings/components/settings/TTSConfigCard.tsx (+37 -1)
📝 src/shared/lib/tts-dialogue.test.ts (+1 -0)

📄 Description

Linked issue

Closes #1360

Why this change

  • Refactor TTS config dropped the legacy audioFormat option, so imported OpenAI-compatible TTS settings could not preserve mp3/wav and native requests always sent response_format: "mp3".

What changed

  • Restored audioFormat to the shared TTS contract with legacy mp3/wav values and an mp3 default.
  • Added the OpenAI-compatible TTS Audio Format selector to the settings card load/save payload.
  • Restored the Rust default config field and sends the configured format in OpenAI-compatible TTS requests, falling back to mp3 for invalid values.
  • Added Rust request-body coverage for configured wav and invalid-format fallback.

Refactor impact

Primary owner:

Rust storage / shared API

Impact areas reviewed:

  • Shared TTS contract schema
  • TTS settings card
  • Native TTS config defaults
  • Native OpenAI-compatible TTS request payload
  • Existing TTS config test fixtures

Boundary notes:

  • Shared contract and feature UI now preserve the legacy audioFormat field.
  • Rust native TTS honors only the legacy mp3/wav formats for OpenAI-compatible requests and falls back to mp3 for unsupported persisted values.
  • ElevenLabs output format, PocketTTS server-specific output controls, and new formats beyond mp3/wav are intentionally out of scope.

Pressure points touched:

  • TTS settings card
  • Native TTS storage/integration command path

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

  • Codex proof:
    • node scratch\issue-1360-tts-audio-format-proof.mjs passes.
    • cargo test --manifest-path src-tauri\Cargo.toml openai_compatible_speak_uses_configured_audio_format --workspace passes.
    • cargo test --manifest-path src-tauri\Cargo.toml openai_compatible_speak_rejects_invalid_audio_format_config --workspace passes.
    • pnpm check passes.
    • git diff --check upstream/refactor...HEAD passes.
    • node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json passes.
  • Manual UI verification still needed before ticking the UI boxes: open Settings/Connections TTS in the browser or Tauri app, choose OpenAI-compatible TTS, confirm the Audio Format select is visible, and confirm saving wav persists.
  • Codex attempted local browser smoke for the settings UI, but the shell-launched Playwright browser hit spawn EPERM; MCP browser navigation confirmed the app shell loads at http://localhost:1420/, but the available MCP toolset did not include a click/action primitive to open the settings panel.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

No docs or release metadata changes needed; this restores an existing legacy config option.

UI evidence

N/A for request-path proof. Manual browser/Tauri UI verification is listed above because local browser interaction was blocked after app-shell load.


🔄 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/1414 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/27/2026 **Status:** ❌ Closed **Base:** `refactor` ← **Head:** `fix/refactor-issue-1360-tts-audio-format` --- ### 📝 Commits (1) - [`f50dbf9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f50dbf93463fea29315d53bd377c55b30756bee2) Restore TTS audio format config ### 📊 Changes **5 files changed** (+170 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/integrations/tts.rs` (+127 -1) 📝 `src/engine/contracts/types/tts.ts` (+4 -0) 📝 `src/features/modes/shared/chat-ui/hooks/use-streaming-tts.test.tsx` (+1 -0) 📝 `src/features/shell/settings/components/settings/TTSConfigCard.tsx` (+37 -1) 📝 `src/shared/lib/tts-dialogue.test.ts` (+1 -0) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue <!-- Every user-facing PR should reference a feature request or issue report when practical. --> Closes #1360 ## Why this change <!-- What user problem, bug, refactor goal, or maintenance need does this solve? --> - Refactor TTS config dropped the legacy `audioFormat` option, so imported OpenAI-compatible TTS settings could not preserve `mp3`/`wav` and native requests always sent `response_format: "mp3"`. ## What changed <!-- List the key changes in this PR. --> - Restored `audioFormat` to the shared TTS contract with legacy `mp3`/`wav` values and an `mp3` default. - Added the OpenAI-compatible TTS Audio Format selector to the settings card load/save payload. - Restored the Rust default config field and sends the configured format in OpenAI-compatible TTS requests, falling back to `mp3` for invalid values. - Added Rust request-body coverage for configured `wav` and invalid-format fallback. ## Refactor impact Primary owner: <!-- Examples: app shell, catalog, chat mode, roleplay mode, game mode, runtime generation, world-state, shared API, engine generation, Rust storage, imports, remote runtime. --> Rust storage / shared API Impact areas reviewed: - Shared TTS contract schema - TTS settings card - Native TTS config defaults - Native OpenAI-compatible TTS request payload - Existing TTS config test fixtures Boundary notes: <!-- Note engine/shared-api/feature/Rust/remote-runtime boundaries. Say "none" only if you checked. --> - Shared contract and feature UI now preserve the legacy `audioFormat` field. - Rust native TTS honors only the legacy `mp3`/`wav` formats for OpenAI-compatible requests and falls back to `mp3` for unsupported persisted values. - ElevenLabs output format, PocketTTS server-specific output controls, and new formats beyond `mp3`/`wav` are intentionally out of scope. Pressure points touched: <!-- Mention ModeSurface, GameSurface, shared mode UI, src-tauri/src/lib.rs command registration, or import modules if touched. --> - TTS settings card - Native TTS storage/integration command path ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> - [ ] `pnpm check` passes locally - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app/runtime, step by step. If an AI agent filled this out, verify it yourself before ticking boxes. --> - Codex proof: - `node scratch\issue-1360-tts-audio-format-proof.mjs` passes. - `cargo test --manifest-path src-tauri\Cargo.toml openai_compatible_speak_uses_configured_audio_format --workspace` passes. - `cargo test --manifest-path src-tauri\Cargo.toml openai_compatible_speak_rejects_invalid_audio_format_config --workspace` passes. - `pnpm check` passes. - `git diff --check upstream/refactor...HEAD` passes. - `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json` passes. - Manual UI verification still needed before ticking the UI boxes: open Settings/Connections TTS in the browser or Tauri app, choose OpenAI-compatible TTS, confirm the Audio Format select is visible, and confirm saving `wav` persists. - Codex attempted local browser smoke for the settings UI, but the shell-launched Playwright browser hit `spawn EPERM`; MCP browser navigation confirmed the app shell loads at `http://localhost:1420/`, but the available MCP toolset did not include a click/action primitive to open the settings panel. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims No docs or release metadata changes needed; this restores an existing legacy config option. ## UI evidence <!-- Add before/after screenshots or recordings for visible UI changes. --> N/A for request-path proof. Manual browser/Tauri UI verification is listed above because local browser interaction was blocked after app-shell load. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:13:01 +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#5079
No description provided.