mirror of
https://github.com/barkeser2002/rvc-inference.git
synced 2026-09-25 02:29:52 +03:00
36 lines
1.0 KiB
Bash
36 lines
1.0 KiB
Bash
#!/bin/bash
|
|
|
|
# Check if Python exists
|
|
if ! command -v python &> /dev/null; then
|
|
echo "Python is not installed. Please install Python before running this script."
|
|
exit 1
|
|
fi
|
|
|
|
# Create virtual environment (.venv)
|
|
python -m venv .venv
|
|
|
|
# Activate virtual environment
|
|
source .venv/bin/activate
|
|
|
|
# Check for Nvidia GPU using nvidia-smi
|
|
if nvidia-smi &> /dev/null; then
|
|
# Install GPU version
|
|
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121
|
|
else
|
|
# Install CPU version
|
|
pip install torch torchvision torchaudio -f https://download.pytorch.org/whl/cpu
|
|
fi
|
|
|
|
# Install dependencies from requirements.txt
|
|
pip install -r requirements.txt
|
|
|
|
# Download requirement voice model
|
|
wget https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt?download=true -O assets/hubert/hubert_base.pt
|
|
wget https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt?download=true -O assets/rvmpe/rmvpe.pt
|
|
|
|
|
|
# Run the inference app
|
|
python app.py
|
|
|
|
echo "Finished!"
|