Download source/scripts/fetch-model.sh from WilburDev/earshelf: direct link, hf CLI and curl.
- Browser
- Download file 614 Bytes
-
https://huggingface.co/spaces/WilburDev/earshelf/resolve/main/source/scripts/fetch-model.sh
- Command line
-
hf download hf://spaces/WilburDev/earshelf/source/scripts/fetch-model.sh
-
curl -L -o fetch-model.sh https://huggingface.co/spaces/WilburDev/earshelf/resolve/main/source/scripts/fetch-model.sh
614 Bytes
| # Optional: self-host the Kokoro voice model (~165 MB) next to the app, so it never needs Hugging Face. | |
| set -euo pipefail | |
| cd "$(dirname "$0")/../public" | |
| base=https://huggingface.co/onnx-community/Kokoro-82M-v1.0-ONNX/resolve/main | |
| mkdir -p models/kokoro/onnx models/kokoro/voices | |
| for f in config.json tokenizer.json tokenizer_config.json onnx/model_fp16.onnx voices/af_heart.bin voices/af_bella.bin voices/am_michael.bin voices/am_fenrir.bin voices/bf_emma.bin voices/bm_george.bin; do | |
| [ -s "models/kokoro/$f" ] || curl -fL --retry 3 -o "models/kokoro/$f" "$base/$f" | |
| done | |
| du -sh models/kokoro | |