voxora-local
Local-directory [voxora_traits::ModelSource] for the
voxora model-agnostic ASR
bridge.
This crate ships:
LocalSource— resolves a model id (e.g."some-org/some-repo/model.bin") against a directory already on disk. No network, no tokio, no reqwest.ChainedSource— first-hit-wins adapter that tries a primary source and falls back to a secondary source onvoxora_traits::AsrError::ModelNotFound. Useful for the "local first, Hugging Face on miss" composition.
Use cases
- Vendored weights. Operators who ship model artefacts with
their binary can resolve them via
LocalSourcewithout a HF token, a cache directory, or outbound network. - Hermetic CI. Every test lane that wants a deterministic
ModelSourcecan wire aLocalSourceagainst atempdirpre-populated bycargobuild scripts. No wiremock, no live HF download, no flake. - Local-first registry. Wrap
ChainedSource::new(LocalSource::new("/srv/models"), HuggingFaceSource::new()?)and hand the result to avoxora-registry::Registry. Local artefacts win; only misses go on the wire.
Quickstart
use Arc;
use ;
use HuggingFaceSource;
use ModelSource;
# async
Limitations
voxora-registry's built-in descriptors only accept HF ids today. TheChainedSourceadapter in this crate is the pattern that honours "local first" without forcing a registry refactor; pass it toRegistry::newand the chain is transparent. A follow-up issue tracks extending the descriptor accept arm toSourceKind::Local.
Surface
| Item | Kind | Description |
|---|---|---|
LocalSource |
struct | Reads model weights from a local directory; zero network deps |
ChainedSource |
struct | First-hit-wins adapter with AsrError::ModelNotFound fallback |
License
Apache-2.0.