Skip to content

fix(tts): reduce Matcha mobile memory reservation - #90

Merged
WardLu merged 1 commit into
previewfrom
codex/mobile-matcha-memory-20260904
Sep 4, 2026
Merged

fix(tts): reduce Matcha mobile memory reservation#90
WardLu merged 1 commit into
previewfrom
codex/mobile-matcha-memory-20260904

Conversation

@WardLu

@WardLu WardLu commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the upstream 512 MB eager shared-memory reservation with a reproducible 256 MB mobile-compatible WASM while retaining memory growth
  • keep the verified 149 MB model data at its existing immutable URL and fetch only the replacement 12 MB runtime
  • support immutable per-file resource URLs across download, cache, runtime and CDN smoke paths
  • document the Android failure root cause, binary derivation, hashes, rollback and Test/Live impact

Root cause

The official sherpa-onnx v1.13.2 WASM declares an 8192-page (512 MB) minimum shared memory. Together with the 149 MB data package and model initialization this can terminate Android browser workers after a successful download. Merely changing the JavaScript memory option fails because the WASM import itself requires 8192 pages.

Validation

  • npm run verify — 41 files / 356 tests passed; public, security, static, build and artifact checks passed
  • affected browser E2E — 32/32 passed
  • full CDN smoke — data and mobile WASM bytes, SHA-256, Content-Type, GET/HEAD and CORS passed
  • restricted 256 MB JS heap + real CDN — initialized one worker and synthesized Chinese/English words and long sentences
  • cache regression — unchanged large data file is reused and only the immutable replacement file is requested
  • no database/schema/data/RLS/function changes

Release impact

  • label: production-impact
  • Preview CDN asset is deployed and verified; Production is not deployed or authorized
  • configuration impact and rollback are recorded in docs/releases/1.3.12/CONFIGURATION_IMPACT.json
  • real Xiaomi/Quark Preview playback remains the final acceptance step

@WardLu WardLu added the production-impact Changes production behavior or release operations label Sep 4, 2026
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
shadow-mate Ready Ready Preview Sep 4, 2026 1:40pm UTC

@WardLu
WardLu merged commit c90253e into preview Sep 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

production-impact Changes production behavior or release operations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant