Repository navigation
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Voice lookup still selects an existing zero-byte uploaded model over the healthy downloaded pair, causing synthesis to fail.
No open issues 🎉
What changed in this PR
This PR separates re-downloadable Piper catalog voices from custom uploads to reduce backup size while preserving uploaded voices.
Changes:
- Redirect catalog downloads to
/data/catalog_voicesand exclude that directory from backups. - Move existing voice pairs only when both files match catalog hashes.
- Preserve
/datafor uploads and document backup and restore behavior.
| File | Description |
|---|---|
piper/rootfs/usr/local/bin/sort_catalog_voices.py |
Adds hash-based migration and catalog download redirection. |
piper/rootfs/etc/s6-overlay/s6-rc.d/piper/run |
Runs migration and launches Piper with the separate catalog directory. |
piper/DOCS.md |
Explains backup exclusions and custom voice preservation. |
piper/config.yaml |
Excludes the catalog voice directory from backups. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
2.5.2 stopped excluding
*.onnxfrom backups because the new web interface can upload custom voices into/data, and an uploaded voice exists nowhere else. That is right for uploads, but it also put catalog voices back into every backup: a single model is 20–110 MB, and the app downloads it again from HuggingFace whenever it is missing.By default,
wyoming-piperuses--download-dirboth for downloading catalog voices (wyoming_piper.download.ensure_voice_exists) and for saving custom voices uploaded through the web UI (wyoming_piper.web_server.make_web_server). To separate the two without losing uploads or keeping newly downloaded catalog voices in backups until the next restart:/data/catalog_voices, whichconfig.yamlexcludes from backups and which is passed towyoming-piperas an additional--data-dir(after/data, so a custom voice in/datawith a catalog name still takes precedence).wyoming_piper.download.ensure_voice_existswhen launchingwyoming-piperso catalog voices downloaded at startup or on demand while the app runs are written directly to/data/catalog_voices, while--download-dirremains/datafor web UI uploads,voices.json, andHF_HOME./data(e.g. from 2.5.2, or uploaded unmodified through the web UI) to/data/catalog_voiceswhen both.onnxand.onnx.jsonmatch the md5 digests in the catalog. Custom voices—including fine-tunes that reuse a catalog voice name—stay in/dataand stay in backups.Supersedes home-assistant/apps#4829.