Repository navigation
feat(server): voice models reuse copies already on disk - #34096
Merged
Merged
Conversation
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.
Problem
Every app that ships local speech-to-text downloads its own copy of the same models. T3 Code always fetched from Hugging Face into its own folder, even when the identical file was already on the machine.
Fix
modelsfolder and the Hugging Face cache for the pinned file and links it instead of downloading.Older servers do not report
supportsModelLinking, so the path field is hidden for them. Mobile has no path field; linked models appear there as installed and can be selected.Evidence
Before: the model list with the new path field.
After linking a folder that holds Moonshine Tiny:
Live run on a dev server: linked a real 34 MB model from a separate folder,
POST /api/voice/models/preparereturned 200 with the native engine loading through the link, and unlinking left the original file in place. The Windows hard-link fallback was not exercised.Tests: two new cases in
SpeechModelStore.test.ts(link from a folder, and Download using a Hugging Face cache copy with zero requests).Claude Fable 5.2 in Claude Code.
🤖 Generated with Claude Code