mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-08-12 11:33:29 +08:00
64 lines
1.5 KiB
Bash
64 lines
1.5 KiB
Bash
#!/bin/bash
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
|
|
|
|
cd "$SCRIPT_DIR" || exit 1
|
|
|
|
cd .. || exit 1
|
|
|
|
set -e
|
|
|
|
WORKFLOW=${WORKFLOW:-"false"}
|
|
LITE=${LITE:-"false"}
|
|
|
|
if [ "$WORKFLOW" = "true" ]; then
|
|
WGET_CMD="wget -nv --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404"
|
|
else
|
|
WGET_CMD="wget --tries=25 --wait=5 --read-timeout=40 --retry-on-http-error=404"
|
|
fi
|
|
|
|
USE_FUNASR=false
|
|
USE_FASTERWHISPER=false
|
|
|
|
if [ "$LITE" = "true" ]; then
|
|
USE_FUNASR=true
|
|
USE_FASTERWHISPER=false
|
|
else
|
|
USE_FUNASR=true
|
|
USE_FASTERWHISPER=true
|
|
fi
|
|
|
|
if [ "$USE_FUNASR" = "true" ]; then
|
|
echo "Downloading funasr..." &&
|
|
$WGET_CMD "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/funasr.zip" &&
|
|
unzip -q funasr.zip -d tools/asr/models/ &&
|
|
rm -rf funasr.zip
|
|
else
|
|
echo "Skipping funasr download"
|
|
fi
|
|
|
|
if [ "$USE_FASTERWHISPER" = "true" ]; then
|
|
echo "Downloading faster-whisper..." &&
|
|
$WGET_CMD "https://huggingface.co/XXXXRT/GPT-SoVITS-Pretrained/resolve/main/faster-whisper.zip" &&
|
|
unzip -q faster-whisper.zip -d tools/asr/models/ &&
|
|
rm -rf faster-whisper.zip
|
|
else
|
|
echo "Skipping faster-whisper download"
|
|
fi
|
|
|
|
source "$HOME/anaconda3/etc/profile.d/conda.sh"
|
|
|
|
if [ "$LITE" = "true" ]; then
|
|
bash install.sh --device "CU${CUDA_VERSION//./}" --source HF
|
|
elif [ "$LITE" = "false" ]; then
|
|
bash install.sh --device "CU${CUDA_VERSION//./}" --source HF --download-uvr5
|
|
else
|
|
exit 1
|
|
fi
|
|
|
|
pip cache purge
|
|
|
|
pip show torch
|
|
|
|
rm -rf "$HOME/.cache" /tmp/* /var/tmp/*
|