Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apt update
- apt-get -y install build-essential python3-dev ffmpeg
- pip3 install --upgrade setuptools wheel
- pip3 install --upgrade pip
- pip3 install faiss-gpu fairseq gradio ffmpeg ffmpeg-python praat-parselmouth pyworld numpy==1.23.5 numba==0.56.4 librosa==0.9.2
- apt -y install -qq aria2
- pip install mega.py
- pip install gdown
- apt install git -y
- apt install unzip -y
- cd /workspace
- git clone https://github.com/Estil1/Retrieval-based-Voice-Conversion-WebUI
- cd Retrieval-based-Voice-Conversion-WebUI
- mkdir -p pretrained uvr5_weights
- git pull
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D32k.pth -d pretrained -o D32k.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D40k.pth -d pretrained -o D40k.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D48k.pth -d pretrained -o D48k.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/G32k.pth -d pretrained -o G32k.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/G40k.pth -d pretrained -o G40k.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/G48k.pth -d pretrained -o G48k.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D32k.pth -d pretrained -o f0D32k.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D40k.pth -d pretrained -o f0D40k.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D48k.pth -d pretrained -o f0D48k.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G32k.pth -d pretrained -o f0G32k.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G40k.pth -d pretrained -o f0G40k.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G48k.pth -d pretrained -o f0G48k.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP2-人声vocals+非人声instrumentals.pth -d uvr5_weights -o HP2-人声vocals+非人声instrumentals.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP5-主旋律人声vocals+其他instrumentals.pth -d uvr5_weights -o HP5-主旋律人声vocals+其他instrumentals.pth
- aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt -d . -o hubert_base.pt
- mkdir -p /workspace/RVC
- mkdir -p /workspace/dataset
- mkdir -p /workspace/EasyDataset
- export MODELNAME="kanye"
- export MODELEPOCH=2333333
- mkdir -p logs/${MODELNAME}
- mkdir -p /workspace/unzips/${MODELNAME}
- unzip -d /workspace/unzips/${MODELNAME} -B /workspace/RVC/${MODELNAME}.zip
- mv /workspace/unzips/${MODELNAME}/${MODELNAME}_D_${MODELEPOCH}.pth logs/${MODELNAME}/G_${MODELEPOCH}.pth
- mv /workspace/unzips/${MODELNAME}/${MODELNAME}_G_${MODELEPOCH}.pth logs/${MODELNAME}/D_${MODELEPOCH}.pth
- mv /workspace/unzips/${MODELNAME}/*.index logs/${MODELNAME}/
- mv /workspace/unzips/${MODELNAME}/*.npy logs/${MODELNAME}/
- mv /workspace/unzips/${MODELNAME}/${MODELNAME}${MODELEPOCH}.pth weights/${MODELNAME}.pth
- rm -r /workspace/unzips/${MODELNAME}/
- python3 infer-web.py --colab --pycmd python3
- gdown 1rYm9GXtgUohZjStdfpLSq65kSZqSmqiz
- gdown 1ZopwMm3pUNh5psgw6HEPxQrgRWp_tzFo
- gdown 1rRLdG-n-35oOjUK3ZNU80xXABNAiqWJx
- ---
- edit `infer-web.py` file
- 1:
- I need to manually add the path here:
- cpt = torch.load(person, map_location="cpu")
- 2: run the following line after the definition of the get_vc function to load a model
- run get_vc("")
- ---
- rename 'infer-web.py' with 'inferrr.py' so i can import things from it
- ---
- make an import of vc_single:
- from inferrr import vc_single
- ---
- run inference:
- vc_single(0, '/workspace/RVC/Vanessa.mp3', 0.0, '', 'pm', 'E:\\codes\\py39\\vits_vc_gpu_train\\logs\\mi-test-1key\\added_IVF677_Flat_nprobe_7.index', 'E:\\codes\\py39\\vits_vc_gpu_train\\logs\\mi-test-1key\\total_fea.npy', 0.6)
- song_output = ...^
- it returns an audio and sampling rate. Save an audio with the right sampling rate like this
- ('Success', (40000, array([ -5, -5, -5, ..., 1481, 590, -489], dtype=int16))
- def get_audio
- if song_output and song_output[0] == 'Success':
- success =
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement