mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6745] [MERGED] feat(tts): support PCM output with browser-playable WAV wrapping #7309
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7309
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6745
Author: @SirAdoni
Created: 9/27/2026
Status: ✅ Merged
Merged: 9/28/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/issue-6709📝 Commits (10+)
5cdbcaffeat(tts): support browser-playable PCM responses (#6709)8814e2echore: preserve unrelated changelog formatting47ad738Merge remote-tracking branch 'origin/staging' into codex/merge-67458ed6644fix(tts): validate WAV chunks and verify PCM playback across browsers22f65ecMerge remote-tracking branch 'origin/staging' into codex/merge-674581e5c88Merge remote-tracking branch 'origin/staging' into codex/merge-6745f55dacdfix(tts): reject zero-valued PCM WAV format fields296116dMerge remote-tracking branch 'origin/staging' into codex/merge-67452d65caefix(tts): validate PCM WAV frame layout37ea8d5Merge remote-tracking branch 'origin/staging' into codex/merge-6745📊 Changes
7 files changed (+537 additions, -4 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)➕
e2e/tts-pcm-settings.e2e.ts(+41 -0)📝
packages/client/src/components/panels/settings/TTSConfigCard.tsx(+1 -0)📝
packages/client/src/localization/locales/en.json(+1 -0)📝
packages/server/src/routes/tts.routes.ts(+153 -3)📝
packages/shared/src/types/tts.ts(+1 -1)➕
scripts/regressions/tts-pcm.regression.ts(+338 -0)📄 Description
Linked issue
Closes #6709
Why this change
Some OpenAI-compatible speech providers return raw PCM, which cannot be used directly by the existing browser audio playback. This adds PCM to the existing output-format setting and packages the returned samples as WAV for playback, without replacing the TTS provider or playback systems.
What changed
response_format: pcmthrough the existing speech route.rateandchannelsmetadata. Only the official HTTPS OpenAI endpoint receives the documented 24 kHz mono fallback.Validation
Final integration head:
820cb7896, based on staging34834afa1(including chat variables and phone navigation).pnpm checkpasses after the final header/frame checks.TTS_PCM_BROWSER_PROOF=1 node scripts/run-regressions.mjs --filter tts-pcmpasses against the real speech route. Valid PCM output decodes in desktop Chromium, Android-sized Chromium and iPhone-sized WebKit, preserving samples, rate, channels and duration.Uint8Array, so its.buffercontains exactly the response bytes; the route regression also compares every byte. Final supplemental local review of both changed files completed with zero findings.820cb7896with no new findings. All required checks and the complete Linux regression suite (421/421 files) passed before merge. Compressed formats retain codec-specific handling; WAVEFORMATEX permits zero sample width for some compressed formats.Human verification checklist:
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Manually verify saved PCM selection after reload and speech playback with the intended provider. Confirm MP3/WAV still work, custom PCM providers supply layout metadata, and missing metadata yields an actionable error. Check both themes and mobile. No human verification is claimed.
Docs and release impact
Unreleased changelog updated. No version bump or changes under
docs/.UI evidence (if applicable)
Before/after screenshots in dark and light themes, desktop Chromium and iPhone-sized WebKit. Download the self-contained HTML gallery from the gist to view its embedded original PNG captures. All screenshots use disposable synthetic data; browser emulation is not a physical-device test.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.