{"id":13861637,"url":"https://github.com/RVC-Project/Retrieval-based-Voice-Conversion","last_synced_at":"2025-07-14T09:32:46.511Z","repository":{"id":206372176,"uuid":"704854339","full_name":"RVC-Project/Retrieval-based-Voice-Conversion","owner":"RVC-Project","description":"in preparation...","archived":false,"fork":false,"pushed_at":"2024-03-26T14:55:59.000Z","size":252,"stargazers_count":127,"open_issues_count":9,"forks_count":19,"subscribers_count":10,"default_branch":"develop","last_synced_at":"2024-04-28T05:15:44.638Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RVC-Project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-10-14T09:52:31.000Z","updated_at":"2024-04-25T11:35:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f78e3b4-89d2-4555-8f36-6a1a54f4a19a","html_url":"https://github.com/RVC-Project/Retrieval-based-Voice-Conversion","commit_stats":null,"previous_names":["rvc-project/retrieval-based-voice-conversion"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RVC-Project%2FRetrieval-based-Voice-Conversion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RVC-Project%2FRetrieval-based-Voice-Conversion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RVC-Project%2FRetrieval-based-Voice-Conversion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RVC-Project%2FRetrieval-based-Voice-Conversion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RVC-Project","download_url":"https://codeload.github.com/RVC-Project/Retrieval-based-Voice-Conversion/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225968846,"owners_count":17553147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T06:01:26.842Z","updated_at":"2025-07-14T09:32:46.496Z","avatar_url":"https://github.com/RVC-Project.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003ch1\u003eRetrieval-based-Voice-Conversion\u003c/h1\u003e\nAn easy-to-use Voice Conversion framework based on VITS.\u003cbr\u003e\u003cbr\u003e\n\n[![madewithlove](https://img.shields.io/badge/made_with-%E2%9D%A4-red?style=for-the-badge\u0026labelColor=orange\n)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion)\n\n\u003cimg src=\"https://counter.seku.su/cmoe?name=rvc\u0026theme=r34\" /\u003e\u003cbr\u003e\n\n[![Licence](https://img.shields.io/github/license/RVC-Project/Retrieval-based-Voice-Conversion?style=for-the-badge)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion/blob/develop/LICENSE)\n\n[![Discord](https://img.shields.io/badge/RVC%20Developers-Discord-7289DA?style=for-the-badge\u0026logo=discord\u0026logoColor=white)](https://discord.gg/HcsmBBGyVk)\n\n\u003c/div\u003e\n\n------\n\n\n\u003e [!NOTE]\n\u003e Currently under development... Provided as a library and API in rvc\n\n## Installation and usage\n\n### Install rvc using pip\n```sh\npip install git+https://github.com/RVC-Project/Retrieval-based-Voice-Conversion\n```\n\n### Standard Setup\n\nFirst, 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.\n\n```sh\nrvc init\n```\nThis will create an `assets` folder and `.env` in your working directory.\n\n\u003e [!WARNING]\n\u003e The directory should be empty or without an assets folder.\n\n### Custom Setup\n\nIf you have already downloaded models or want to change these configurations, edit the `.env` file.\nIf you do not already have a `.env` file,\n\n```sh\nrvc env create\n```\ncan create one.\n\nAlso, when downloading a model, you can use the\n\n```sh\nrvc dlmodel\n```\nor\n```\nrvc dlmodel {download_dir}\n```\n\nFinally, specify the location of the model in the env file, and you are done!\n\n\n\n### Library Usage\n\n#### Inference Audio\n```python\nfrom pathlib import Path\n\nfrom dotenv import load_dotenv\nfrom scipy.io import wavfile\n\nfrom rvc.modules.vc.modules import VC\n\n\ndef main():\n      vc = VC()\n      vc.get_vc(\"{model.pth}\")\n      tgt_sr, audio_opt, times, _ = vc.vc_inference(\n            1, Path(\"{InputAudio}\")\n      )\n      wavfile.write(\"{OutputAudio}\", tgt_sr, audio_opt)\n\n\nif __name__ == \"__main__\":\n      load_dotenv(\"{envPath}\")\n      main()\n\n```\n\n### CLI Usage\n\n#### Inference Audio\n\n```sh\nrvc infer -m {model.pth} -i {input.wav} -o {output.wav}\n```\n\n| option        | flag\u0026nbsp; | type         | default value | description                                                                                                                                                                                                                                    |\n|---------------|------------|--------------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| modelPath     | -m         | Path         | *required     | Model path or filename (reads in the directory set in env)                                                                                                                                                                                     |\n| inputPath     | -i         | Path         | *required     | Input audio path or folder                                                                                                                                                                                                                     |\n| outputPath    | -o         | Path         | *required     | Output audio path or folder                                                                                                                                                                                                                    |\n| sid           | -s         | int          | 0             | Speaker/Singer ID                                                                                                                                                                                                                              |\n| f0_up_key     | -fu        | int          | 0             | Transpose (integer, number of semitones, raise by an octave: 12, lower by an octave: -12)                                                                                                                                                      |\n| f0_method     | -fm        | str          | rmvpe         | pitch extraction algorithm (pm, harvest, crepe, rmvpe                                                                                                                                                                                          |\n| f0_file       | -ff        | Path \\| None | None          | F0 curve file (optional). One pitch per line. Replaces the default F0 and pitch modulation                                                                                                                                                     |\n| index_file    | -if        | Path \\| None | None          | Path to the feature index file                                                                                                                                                                                                                 |\n| index_rate    | -if        | float        | 0.75          | Search feature ratio (controls accent strength, too high has artifacting)                                                                                                                                                                      |\n| filter_radius | -fr        | int          | 3             | If \u003e=3: apply median filtering to the harvested pitch results. The value represents the filter radius and can reduce breathiness                                                                                                               |\n| resample_sr   | -rsr       | int          | 0             | Resample the output audio in post-processing to the final sample rate. Set to 0 for no resampling                                                                                                                                              |\n| 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 |\n| 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                                 |\n\n### API Usage\nFirst, start up the server.\n```sh\nrvc-api\n```\nor\n```sh\npoetry run poe rvc-api\n```\n\n#### Inference Audio\n\n##### Get as blob\n```sh\ncurl -X 'POST' \\\n      'http://127.0.0.1:8000/inference?res_type=blob' \\\n      -H 'accept: application/json' \\\n      -H 'Content-Type: multipart/form-data' \\\n      -F 'modelpath={model.pth}' \\\n      -F 'input={input audio path}'\n```\n\n##### Get as json(include time)\n```sh\ncurl -X 'POST' \\\n      'http://127.0.0.1:8000/inference?res_type=json' \\\n      -H 'accept: application/json' \\\n      -H 'Content-Type: multipart/form-data' \\\n      -F 'modelpath={model.pth}' \\\n      -F 'input={input audio path}'\n```\n\n### Docker Usage\n\nBuild and run via script:\n\n```bash\n./docker-run.sh\n```\n\n**Or** use manually:\n\n1. Build:\n\n   ```bash\n   docker build -t \"rvc\" .\n   ```\n\n2. Run:\n\n   ```bash\n   docker run -it \\\n     -p 8000:8000 \\\n     -v \"${PWD}/assets/weights:/weights:ro\" \\\n     -v \"${PWD}/assets/indices:/indices:ro\" \\\n     -v \"${PWD}/assets/audios:/audios:ro\" \\\n     \"rvc\"\n   ```\n\nNotice assumption that weights, indices and input audios are stored in `current-directory/assets`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRVC-Project%2FRetrieval-based-Voice-Conversion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRVC-Project%2FRetrieval-based-Voice-Conversion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRVC-Project%2FRetrieval-based-Voice-Conversion/lists"}