An easy-to-use fork of the Retrieval-based Voice Conversion project.
Note
I am NOT the original creator of RVC. The original project can be found here. All work should be attributed to them.
For an implementation that provides more configuration options, check out rvc-python
I created this fork because the original code for RVC is pretty awkward to integrate into projects. This library should hopefully make that process simpler for other developers by providing:
- A dirt simple API for converting voices.
- Automatic downloads of the required models (thanks to the Applio Hugginface Repository).
- An easy installation process with all dependencies accounted for.
Install the package:
pip install git+https://github.com/Nikerino/LibRVC.git
Install PyTorch with CUDA support:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
from librvc import RVC
import soundfile as sf
rvc = RVC(model_dir='.checkpoints')
data, fs = rvc.convert('speaker.pth', 'speaker.index', 'source.wav', pitch_shift=6)
sf.write('out.wav', data, fs)
- Single audio file conversions only
- Only customization provided is pitch shifting
- Only uses RVMPE for feature extraction
Feel free to open up PRs to expand on any of these. For my use-cases, this is plenty.