Downloads a PiperHub voice (.onnx + .onnx.json) into modelsDir.
Files are cached as <slug>.onnx / <slug>.onnx.json and skipped when
already present and non-empty.
Primary source is the voice's own Hugging Face repo. When it no longer
serves the files, download automatically falls back to the community
mirror (fox3000foxy/piper-voices-collection).
Parameters
slugOrRef: string
Bare slug, hub:<slug>, or full piperhub.org page URL.
modelsDir: string
Destination directory.
Returns Promise<string>
Absolute path to the local .onnx file.
Throws
When the voice is flagged unusable, or when neither the
primary repo nor the mirror serves the files.
Downloads a PiperHub voice (
.onnx+.onnx.json) intomodelsDir. Files are cached as<slug>.onnx/<slug>.onnx.jsonand skipped when already present and non-empty.Primary source is the voice's own Hugging Face repo. When it no longer serves the files, download automatically falls back to the community mirror (
fox3000foxy/piper-voices-collection).