Skip to main content

Retrieval-based-Voice-Conversion

An easy-to-use Voice Conversion framework based on VITS.

madewithlove


Licence

Discord


Installation and usage

Standard Setup

First, create a directory in your project. The assets folder will contain the models needed for inference and training, and the result folder will contain the results of the training.

rvc init

This will create an assets folder and .env in your working directory.

Custom Setup

If you have already downloaded models or want to change these configurations, edit the .env file. If you do not already have a .env file,

rvc env create

can create one.

Also, when downloading a model, you can use the

rvc dlmodel

or

rvc dlmodel {download_dir}

Finally, specify the location of the model in the env file, and you are done!

Library Usage

Inference Audio

from pathlib import Path

from dotenv import load_dotenv
from scipy.io import wavfile

from rvc.modules.vc.modules import VC


def main():
      vc = VC()
      vc.get_vc("{model.pth}")
      tgt_sr, audio_opt, times, _ = vc.vc_single(
            1, Path("{InputAudio}")
      )
      wavfile.write("{OutputAudio}", tgt_sr, audio_opt)


if __name__ == "__main__":
      load_dotenv("{envPath}")
      main()

CLI Usage

Inference Audio

rvc infer -m {model.pth} -i {input.wav} -o {output.wav}
option flag  type default value description
modelPath -m Path *required Model path or filename (reads in the directory set in env)
inputPath -i Path *required Input audio path or folder
outputPath -o Path *required Output audio path or folder
sid -s int 0 Speaker/Singer ID
f0_up_key -fu int 0 Transpose (integer, number of semitones, raise by an octave: 12, lower by an octave: -12)
f0_method -fm str rmvpe pitch extraction algorithm (pm, harvest, crepe, rmvpe
f0_file -ff Path | None None F0 curve file (optional). One pitch per line. Replaces the default F0 and pitch modulation
index_file -if Path | None None Path to the feature index file
index_rate -if float 0.75 Search feature ratio (controls accent strength, too high has artifacting)
filter_radius -fr int 3 If >=3: apply median filtering to the harvested pitch results. The value represents the filter radius and can reduce breathiness
resample_sr -rsr int 0 Resample the output audio in post-processing to the final sample rate. Set to 0 for no resampling
rms_mix_rate -rmr float 0.25 Adjust the volume envelope scaling. Closer to 0, the more it mimicks the volume of the original vocals. Can help mask noise and make volume sound more natural when set relatively low. Closer to 1 will be more of a consistently loud volume
protect -p float 0.33 Protect voiceless consonants and breath sounds to prevent artifacts such as tearing in electronic music. Set to 0.5 to disable. Decrease the value to increase protection, but it may reduce indexing accuracy

API Usage

First, start up the server.

rvc-api

or

poetry run poe rvc-api

Inference Audio

curl -X 'POST' \
      'http://127.0.0.1:8000/inference' \
      -H 'accept: application/json' \
      -H 'Content-Type: multipart/form-data' \
      -F 'modelpath={model.pth}' \
      -F 'input={input audio path}' \
      -o {output audio path}

Metadata

Release files for rvc 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rvc 0.3.5
File Size Uploaded
rvc-0.3.5.tar.gz 90.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rvc 0.3.5
File Interpreter ABI Platform
rvc-0.3.5-py3-none-any.whl Python 3 none any Details

Total release size: 220.0 kB

Release files / rvc-0.3.5.tar.gz

Download URL rvc-0.3.5.tar.gz
Size 90.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ad59fd93c004a8542240ef3ae5561a0f03b09ce6c7679e63fd582b1478d0bfa7
BLAKE2b-256 checksum
How to use checksums
2529919d3e8e8d52ecc6a152683c7884d1c4914e79db6d7668fb9e88e427bb2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.2 Darwin/23.2.0

Release files / rvc-0.3.5-py3-none-any.whl

Download URL rvc-0.3.5-py3-none-any.whl
Size 130.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e55c887be49850869a347c71a51af03b0d5e86f737c9078ca14241730490de2
BLAKE2b-256 checksum
How to use checksums
db77090f8f9ed42eea138042f68b4734ee79e330c679531a7e20508701e33fc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.2 Darwin/23.2.0

Release history Release notifications | RSS feed

This release

0.3.5 This release

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page