Skip to content

How to install RVC on Linux? (Script made for Debian or Arch based distros) #1024

@Felipecconde

Description

@Felipecconde

In a few words, describe your idea

My script

More information

I did I script and wanted to share if you guys. It's not perfect, but I don't have time to spend on it, and I dont have so much bash scripts experience. Feel free to change and adapat.

#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
#IF THERE IS ANY ERROR WHEN EXECUTING THIS SCRIPT, PLEASE JUST COPY AND PASTE MANUALLY ON THE TERMINAL!
echo "Installing RVC and dependences..."
cd /home/$USER/Downloads/
echo
sudo pacman -S python3
sudo apt install python3
sudo apt install libportaudio2
sudo pacman -S portaudio
sudo apt install libasound-dev
sudo pacman -S alsa-lib

VERSION=$(curl --silent "https://repo.anaconda.com/archive/" | grep -E "[^.]*-Linux-x86_64\.sh[^.]*\." -m 1 | sed -e 's/<td><a href="//' -e 's/">.*<\/a><\/td>//' | sed -e 's/<td><a href="//' -e 's/">.*<\/a><\/td>//' -e 's/^ *//' -e 's/ *$//')
wget "https://repo.anaconda.com/archive/$VERSION" -P /home/$USER/Downloads
bash /home/$USER/Downloads/$VERSION
echo "Please, wait a half minute while Anaconda updates..."
sleep 30
$(conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia)
$(conda create -n vcclient-dev python=3.10)
$(conda activate vcclient-dev)
pip install chardet --break-system-packages
pip install numpy==1.24.0 --break-system-packages
git clone https://github.com/w-okada/voice-changer.git
cd voice-changer/server
pip install -r requirements.txt --break-system-packages
pip install --force-reinstall -v "pyworld==0.3.4" --break-system-packages

echo "Starting server for the first time..."

python3 MMVCServerSIO.py -p 18888 --https true \
    --content_vec_500 pretrain/checkpoint_best_legacy_500.pt  \
    --content_vec_500_onnx pretrain/content_vec_500.onnx \
    --content_vec_500_onnx_on true \
    --hubert_base pretrain/hubert_base.pt \
    --hubert_base_jp pretrain/rinna_hubert_base_jp.pt \
    --hubert_soft pretrain/hubert/hubert-soft-0d54a1f4.pt \
    --nsf_hifigan pretrain/nsf_hifigan/model \
    --crepe_onnx_full pretrain/crepe_onnx_full.onnx \
    --crepe_onnx_tiny pretrain/crepe_onnx_tiny.onnx \
    --rmvpe pretrain/rmvpe.pt \
    --model_dir model_dir \
    --samples samples.json
    
echo "Creating a Desktop Entry..."

sudo touch /usr/share/applications/rvc-linux.desktop
sudo chmod +x /usr/share/applications/rvc-linux.desktop
sudo sed -i '/[Desktop Entry] \ Name=RVC \ Exec=bash -c "python3 MMVCServerSIO.py -p 18888 --https true \    --content_vec_500 pretrain/checkpoint_best_legacy_500.pt  \    --content_vec_500_onnx pretrain/content_vec_500.onnx \    --content_vec_500_onnx_on true \    --hubert_base pretrain/hubert_base.pt \    --hubert_base_jp pretrain/rinna_hubert_base_jp.pt \    --hubert_soft pretrain/hubert/hubert-soft-0d54a1f4.pt \    --nsf_hifigan pretrain/nsf_hifigan/model \    --crepe_onnx_full pretrain/crepe_onnx_full.onnx \    --crepe_onnx_tiny pretrain/crepe_onnx_tiny.onnx \    --rmvpe pretrain/rmvpe.pt \    --model_dir model_dir \    --samples samples.json && xdg-open https://localhost:18888" \ Type=Application \ Terminal=true \ Icon=audiobook' /usr/share/applications/rvc-linux.desktop```

*The .desktop entry part are not executing sed (writing on file), I don't know why. Just ignore and use cli to start the server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions