Update README.md
Browse files
README.md
CHANGED
@@ -1,32 +1,42 @@
|
|
1 |
-
# python RVC inference
|
2 |
|
3 |
-
|
4 |
-
**This project is still under development.</a>.**
|
5 |
|
6 |
-

|
7 |
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
## Installation
|
11 |
|
12 |
-
|
13 |
|
14 |
```bash
|
15 |
pip install rvc-inferpy
|
16 |
```
|
|
|
17 |
|
18 |
-
|
19 |
-
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
|
|
24 |
from rvc_inferpy import RVCConverter
|
25 |
|
26 |
# Initialize the converter with default settings
|
27 |
converter = RVCConverter(device="cuda:0", is_half=True)
|
28 |
|
29 |
-
# Define the voice model name (
|
30 |
voice_model = "default"
|
31 |
|
32 |
# Path to the input audio file
|
@@ -36,54 +46,44 @@ audio_path = "input_audio.wav"
|
|
36 |
output_path = converter.infer_audio(
|
37 |
voice_model=voice_model,
|
38 |
audio_path=audio_path,
|
39 |
-
f0_change=0,
|
40 |
-
f0_method="rmvpe+",
|
41 |
-
split_infer=False,
|
42 |
-
index_rate=0.75,
|
43 |
-
filter_radius=3,
|
44 |
-
resample_sr=0,
|
45 |
-
protect=0.33,
|
46 |
)
|
47 |
|
48 |
-
#
|
49 |
print(f"Generated voice conversion output: {output_path}")
|
50 |
```
|
51 |
-
|
52 |
-
The `infer_audio` function will return the processed audio object based on the provided parameters
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
|
60 |
## Terms of Use
|
61 |
|
62 |
-
The
|
63 |
|
64 |
-
|
65 |
|
66 |
-
|
67 |
|
68 |
-
|
69 |
|
70 |
-
|
71 |
|
72 |
-
|
73 |
|
74 |
-
|
75 |
|
76 |
## Disclaimer
|
77 |
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
|
82 |
## Credits
|
83 |
|
84 |
-
|
85 |
-
|
|
|
86 |
|
87 |
-
## License
|
88 |
|
89 |
-
This project is licensed under the [MIT License](()]).
|
|
|
|
|
1 |
|
2 |
+
# Python RVC Inference
|
|
|
3 |
|
4 |
+
[](https://pypi.org/project/rvc-inferpy/)
|
5 |
|
6 |
+
**Note:** This project is currently under development.
|
7 |
+
|
8 |
+
`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.
|
9 |
+
|
10 |
+
## Table of Contents
|
11 |
+
|
12 |
+
- [Installation](#installation)
|
13 |
+
- [Usage](#usage)
|
14 |
+
- [Terms of Use](#terms-of-use)
|
15 |
+
- [Disclaimer](#disclaimer)
|
16 |
+
- [Credits](#credits)
|
17 |
+
- [License](#license)
|
18 |
|
19 |
## Installation
|
20 |
|
21 |
+
Install the package using pip:
|
22 |
|
23 |
```bash
|
24 |
pip install rvc-inferpy
|
25 |
```
|
26 |
+
For additional dependencies, install the required version of Fairseq:
|
27 |
|
28 |
+
pip install git+https://github.com/One-sixth/fairseq.git
|
|
|
29 |
|
30 |
+
## Usage
|
31 |
|
32 |
+
Below is an example of how to use rvc-inferpy in your Python project:
|
33 |
+
```
|
34 |
from rvc_inferpy import RVCConverter
|
35 |
|
36 |
# Initialize the converter with default settings
|
37 |
converter = RVCConverter(device="cuda:0", is_half=True)
|
38 |
|
39 |
+
# Define the voice model name (ensure the model exists under "models/{voice_model}/")
|
40 |
voice_model = "default"
|
41 |
|
42 |
# Path to the input audio file
|
|
|
46 |
output_path = converter.infer_audio(
|
47 |
voice_model=voice_model,
|
48 |
audio_path=audio_path,
|
49 |
+
f0_change=0, # Pitch change (in semitones)
|
50 |
+
f0_method="rmvpe+", # Pitch estimation method
|
51 |
+
split_infer=False, # Whether to split audio based on silence
|
52 |
+
index_rate=0.75, # Index rate (adjusts voice timbre)
|
53 |
+
filter_radius=3, # Filter smoothing radius
|
54 |
+
resample_sr=0, # Resample audio (0 keeps original sample rate)
|
55 |
+
protect=0.33, # Protect voiced consonants from distortion
|
56 |
)
|
57 |
|
58 |
+
# Output the path to the generated audio file
|
59 |
print(f"Generated voice conversion output: {output_path}")
|
60 |
```
|
61 |
+
The infer_audio function returns the processed audio object based on the provided parameters.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
## Terms of Use
|
64 |
|
65 |
+
The following uses of the converted voice are prohibited:
|
66 |
|
67 |
+
Criticizing or attacking individuals.
|
68 |
|
69 |
+
Advocating for or opposing specific political positions, religions, or ideologies.
|
70 |
|
71 |
+
Publicly displaying strongly stimulating expressions without proper zoning.
|
72 |
|
73 |
+
Selling voice models or generated voice clips.
|
74 |
|
75 |
+
Impersonating the original voice owner with malicious intent.
|
76 |
|
77 |
+
Using the software for fraudulent purposes such as identity theft or fraudulent phone calls.
|
78 |
|
79 |
## Disclaimer
|
80 |
|
81 |
+
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.
|
|
|
|
|
82 |
|
83 |
## Credits
|
84 |
|
85 |
+
IAHispano's Applio: Base of this project.
|
86 |
+
|
87 |
+
RVC-Project: Original RVC repository.
|
88 |
|
|
|
89 |
|
|