|
<div align="center"> |
|
|
|
# Python RVC Inference |
|
|
|
</div> |
|
|
|
[](https://pypi.org/project/rvc-inferpy/) |
|
|
|
**Note:** This project is currently under development. |
|
|
|
`rvc_inferpy` is a Python library for performing audio inference using Retrieval-based Voice Conversion (RVC). It offers a straightforward command-line interface (CLI) and can be easily integrated into Python projects for advanced audio processing with customizable parameters. |
|
|
|
## Table of Contents |
|
|
|
- [Installation](#installation) |
|
- [Usage](#usage) |
|
- [Terms of Use](#terms-of-use) |
|
- [Disclaimer](#disclaimer) |
|
- [Credits](#credits) |
|
- [License](#license) |
|
|
|
## Installation |
|
|
|
Install the package using pip: |
|
|
|
```bash |
|
pip install rvc-inferpy |
|
``` |
|
For additional dependencies, install the required version of Fairseq: |
|
``` |
|
pip install git+https://github.com/One-sixth/fairseq.git |
|
``` |
|
## Usage |
|
|
|
Below is an example of how to use rvc-inferpy in your Python project: |
|
``` |
|
# Method 1: Direct import |
|
from rvc_inferpy.converter import RVCConverter |
|
|
|
# Method 2: Import with alias |
|
from rvc_inferpy.converter import RVCConverter as VoiceConverter |
|
|
|
# Method 3: Import entire module |
|
import rvc_inferpy.converter |
|
converter = rvc_inferpy.converter.RVCConverter() |
|
|
|
|
|
# Create an instance |
|
converter = RVCConverter( |
|
device="cuda:0", # GPU device (or "cpu" if no GPU) |
|
is_half=True, # Use half precision |
|
models_dir=MODELS_DIR, # Directory containing models |
|
download_if_missing=True # Download models if not found |
|
) |
|
|
|
# Use the converter |
|
output_path = converter.infer_audio( |
|
voice_model="your_model_name", |
|
audio_path="input_audio.wav" |
|
) |
|
|
|
|
|
``` |
|
The infer_audio function returns the processed audio object based on the provided parameters. |
|
|
|
## Terms of Use |
|
|
|
The following uses of the converted voice are prohibited: |
|
|
|
Criticizing or attacking individuals. |
|
|
|
Advocating for or opposing specific political positions, religions, or ideologies. |
|
|
|
Publicly displaying strongly stimulating expressions without proper zoning. |
|
|
|
Selling voice models or generated voice clips. |
|
|
|
Impersonating the original voice owner with malicious intent. |
|
|
|
Using the software for fraudulent purposes such as identity theft or fraudulent phone calls. |
|
|
|
## Disclaimer |
|
|
|
The author is not liable for any direct, indirect, consequential, incidental, or special damages arising from the use, misuse, or inability to use this software. |
|
|
|
## Credits |
|
|
|
IAHispano's Applio: Base of this project. |
|
|
|
RVC-Project: Original RVC repository. |
|
|
|
|
|
|