File size: 614 Bytes
4a58e48 | 1 2 3 4 5 6 7 8 9 10 11 | #!/usr/bin/env bash
# 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
|