Skip to content

fix(piper): persist the voice cache used by the shipped image - #4967

Closed
tang-vu wants to merge 2 commits into
Osmantic:public-betafrom
tang-vu:fix/beta-piper-model-cache-mount-20260914
Closed

tang-vu wants to merge 2 commits into
Osmantic:public-betafrom
tang-vu:fix/beta-piper-model-cache-mount-20260914

Conversation

@tang-vu

@tang-vu tang-vu commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Ready for independent review (2026-09-15). Candidate b9ce80dc0ca5bf2d3e03f53505f0fb4445ab53c6 has a successful GitHub check rollup and no base-branch conflict at this review snapshot. This supersedes earlier draft-status wording only. All validation gaps, migration requirements, live gates and independent human review requirements below remain in force; this is not a merge-ready approval.

Piper 1.6.3 downloads and reads voices at /config, while ODS persisted only /config/piper. Mount the existing host data/piper directory at the directory the image actually uses. Keep the voice selector and Wyoming port unchanged.

Why this matters

The image's declared /config volume becomes an anonymous Docker volume outside ODS's host data directory. Compose can retain that volume during some recreations, but removing the container and creating it again does not reconnect the cache. The corrected mount makes the cache part of data/piper and makes custom voice pairs placed there discoverable. The README includes backup/recovery instructions, collision checks and rollback guidance.

Overlap check

Searched open and closed upstream PRs for Piper, persistence/model-cache terms, and changed production file ods/extensions/library/services/piper-audio/compose.yaml. #1034, #635 and #610 address health/protocol timeouts; they do not persist the image's /config model directory. This is a separate storage contract. The Makefile addition is additive with the other beta batch contracts.

Regression and validation

  • python3 ods/tests/test-piper-model-mount.py: actual Compose plan fails on the old target and passes with the correction, including an install directory containing spaces and unchanged voice/port values.
  • Exact image lscr.io/linuxserver/piper:1.6.3, digest sha256:faecd532f4a455c79ddc9068921e29de58945d3b68946d6739ff6f9c7acf66b4: inspected its packaged run script; downloaded the default voice, verified Wyoming Describe, removed/recreated the container with the same volume and --network none, and verified Describe plus the identical model SHA-256. Isolated containers and volume were removed.
  • Scoped pre-commit and git diff --check: pass.
  • make gate: reaches the known baseline root/WSL no-sudo fixture failure (3 pass, 2 fail); this is not an all-green gate.

Limits and review gates

The cache recreation probe passed on Linux amd64 under WSL. A separate Wyoming synthesis attempt failed in the shipped image with FileNotFoundError opening an empty output filename; it is recorded as failed, not evidence of working TTS. An earlier fixture also missed readiness because it initially inspected only stdout; the corrected cache probe inspected both streams. Native ARM/macOS, full ODS enable/reinstall, custom-voice migration and successful synthesis remain unverified. The synthesis failure must be independently assessed before making runtime readiness claims. Existing custom voices require the documented backup before the old container is removed.

Final candidate b9ce80dc0ca5bf2d3e03f53505f0fb4445ab53c6: 32 successful CI checks, 4 conditionally skipped; no pending or failed checks.

Exact-SHA repeat 10-sha-live passed in 96.71 seconds on Linux amd64 at this candidate, image digest sha256:faecd532f4a455c79ddc9068921e29de58945d3b68946d6739ff6f9c7acf66b4: initial model download, Wyoming Describe and identical model SHA after recreation with networking disabled. Fixture container/volume cleaned. This is cache/protocol evidence; the separately recorded synthesis limitation is unchanged.

Batch integration receipt

This is one of 30 independently branched public-beta PRs. The published synthetic integration head is 61f4c6fccc81bea697f4941683fefb5089ba77f4, built from baseline d49ad4bbc760be319de7f4c9b9a93b1f18fe3922 in this reproducible order:

#4946 → #4948 → #4951 → #4954 → #4972 → #4960 → #4961 → #4957 → #4964 → #4967 → #4968 → #4971 → #4975 → #4976 → #4984 → #4982 → #4990 → #4988 → #4989 → #4997 → #5003 → #5006 → #5007 → #5009 → #5012 → #5011 → #5013 → #5014 → #5020 → #5021

Reconciliation preserved all 146 files owned by a single PR byte-for-byte against their exact candidate heads. The eight shared paths preserve both CLI STT/TTS commands and help, every added Makefile test, both environment schema additions and all Extensions UI behavior. LanguageTool and Kroki both remain headless API entries. Canonical regeneration yields 76 catalog entries and 47 library manifests; all README rows are retained. Shared-file changes need these additive resolutions when merged independently.

Combined validation: 2,852 API tests passed / 1 skipped; 1,082 UI tests passed; 47 manifests passed; all 12 added Makefile commands passed; 12 catalog boundary tests passed / 12 opt-in runtime tests skipped in this combined run. Individual exact-image results remain documented above. UI lint/build, scoped secret hooks, diff checks, four platform smoke tests and installer simulation passed. Compose plans for NVIDIA/AMD/Apple each contain 20 services and no duplicate published bindings across the core plus 12 new recipes; this is static plan evidence, not simultaneous startup or GPU inference.

The first unrestricted UI run timed out in two tests under concurrent load; the complete rerun used --maxWorkers=2 with unchanged assertions and timeouts and passed. ESLint reports zero errors and 603 warnings, including the existing JSX usage-detection pattern. Full local make gate still fails the no-sudo Docker baseline covered by #3158. BATS records 416 passed / 5 failed on this root/WSL host (platform detection, root preflight and a 15 GiB versus 20 GiB free-space expectation). Neither full local gate nor BATS is described as green.

This integration receipt supplements each PR's own regression and does not waive its independent review, live hardware/browser/upgrade gates or rollback requirements. The PRs remain drafts; none was merged upstream.

This was referenced Sep 14, 2026
@tang-vu
tang-vu marked this pull request as ready for review September 15, 2026 01:32
@Lightheartdevs

Copy link
Copy Markdown
Collaborator

Thanks for this contribution. public-beta was promoted into main on 2026-09-24 and no longer receives changes, so we're closing pull requests that target it. This isn't a judgment on the change itself. If it's still needed, please rebase onto main and open a focused PR. See #7253 for details and the contribution policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants