fix(speech): pin the voice models to a revision instead of someone else's HEAD - #294
Merged
Conversation
…se's HEAD `voice_url` resolved `main`. These are ONNX models the app downloads and then runs, and `resolve/main` is whatever is at the head of someone else's repository at the moment the button is pressed — a different model tomorrow, and possibly a different one for two people on the same build. Pinned to a commit, so the download is reproducible and changing it is a change to this file. Not a per-file sha256: that needs a hash for every voice in `VOICES` and a way to keep them current, for a weaker guarantee than pinning the tree they all come from. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
voice_urlbuilthttps://huggingface.co/rhasspy/piper-voices/resolve/**main**/…. It now resolves a pinned commit.Why
These are ONNX models the app downloads and then runs.
resolve/mainmeans whatever is at the head of someone else's repository at the moment the button is pressed — a different model tomorrow than today, and potentially a different model for two people on the same build of this app. A mutable ref is not a URL for something you execute.Pinning makes the download reproducible and makes a change to it a change to this file, reviewable like any other.
Not a per-file sha256: that would need a hash for every voice in
VOICESand a way to keep them current, for a weaker guarantee than pinning the tree they all come from.Verification
cargo clippy --workspace --all-targets -- -D warnings— cleancargo test --workspace— pass.a_voice_id_derives_its_own_download_urlnow builds its expectation from the constant, so it cannot drift, and asserts the constant is a 40-character hex sha — pasting a branch name back in is a red test.HTTP/2 302to the CDN, so this revision really does serve the voices../scripts/shots/shoot.sh check— pass./scripts/web/build.sh— passwasm
Before
4048966, after4048962. Native-only code; the four bytes are noise.🤖 Generated with Claude Code