Spaces:
Running
Running
Download scripts/bootstrap.sh from thekrocot/tts-engine-backend: direct link, hf CLI and curl.
- Browser
- Download file 994 Bytes
-
https://huggingface.co/spaces/thekrocot/tts-engine-backend/resolve/main/scripts/bootstrap.sh
- Command line
-
hf download hf://spaces/thekrocot/tts-engine-backend/scripts/bootstrap.sh
-
curl -L -o bootstrap.sh https://huggingface.co/spaces/thekrocot/tts-engine-backend/resolve/main/scripts/bootstrap.sh
994 Bytes
| set -e | |
| cd /app | |
| RVC_CONTENTVEC_QUANTIZED="${RVC_CONTENTVEC_QUANTIZED:-0}" | |
| if [ "${RVC_DISABLE_DOWNLOAD:-0}" = "1" ]; then | |
| echo "[bootstrap] model download disabled (RVC_DISABLE_DOWNLOAD=1)" | |
| elif [ -f models/rvc/contentvec.onnx ] && [ -f models/rvc/rmvpe.onnx ]; then | |
| echo "[bootstrap] RVC base models already present" | |
| else | |
| echo "[bootstrap] downloading RVC base models..." | |
| EXTRA="" | |
| if [ "${RVC_CONTENTVEC_QUANTIZED}" = "1" ]; then | |
| EXTRA="--quantized" | |
| echo "[bootstrap] using int8 content encoder (fast on CPU)" | |
| else | |
| echo "[bootstrap] using fp32 content encoder" | |
| fi | |
| # shellcheck disable=SC2086 | |
| python scripts/download_models.py ${EXTRA} --output models/rvc | |
| fi | |
| if [ -f models/rvc/voices.json ]; then | |
| echo "[bootstrap] downloading voice models from manifest..." | |
| python scripts/download_voices.py --manifest models/rvc/voices.json --voices-dir models/rvc/voices | |
| fi | |
| exec uvicorn app.main:app --host 0.0.0.0 --port 7860 |