Skip to main content

Easy tools for RVC Inference

Project description

Python RVC Inference

PyPI

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

Install the package using pip:

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:

from rvc_inferpy import RVCConverter

# Initialize the converter with default settings
converter = RVCConverter(device="cuda:0", is_half=True)

# Define the voice model name (ensure the model exists under "models/{voice_model}/")
voice_model = "default"

# Path to the input audio file
audio_path = "input_audio.wav"

# Perform voice conversion
output_path = converter.infer_audio(
    voice_model=voice_model,
    audio_path=audio_path,
    f0_change=0,           # Pitch change (in semitones)
    f0_method="rmvpe+",     # Pitch estimation method
    split_infer=False,      # Whether to split audio based on silence
    index_rate=0.75,        # Index rate (adjusts voice timbre)
    filter_radius=3,        # Filter smoothing radius
    resample_sr=0,          # Resample audio (0 keeps original sample rate)
    protect=0.33,           # Protect voiced consonants from distortion
)

# Output the path to the generated audio file
print(f"Generated voice conversion output: {output_path}")

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rvc_inferpy-0.7.1.tar.gz (50.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rvc_inferpy-0.7.1-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

Details for the file rvc_inferpy-0.7.1.tar.gz.

File metadata

  • Download URL: rvc_inferpy-0.7.1.tar.gz
  • Upload date:
  • Size: 50.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for rvc_inferpy-0.7.1.tar.gz
Algorithm Hash digest
SHA256 a370d7cc12a2bc04b7d229cda09e8822229629be3bb16028143e20c51bf52dd9
MD5 a3a907e6d241a3c3c3d3da6f5d0da56c
BLAKE2b-256 6440c6350907cf0e08ea6e9b7c9bdc201c5536ab0f5f36484046ef8f83685e50

See more details on using hashes here.

File details

Details for the file rvc_inferpy-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: rvc_inferpy-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 53.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for rvc_inferpy-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 23679737f0c22bb91d89afc17270023ead63463bbaf27a939d1ae58cc248b292
MD5 f10504aa5e80b14079120592cce737df
BLAKE2b-256 02ff4d7c582125591ec6043dcf741bd0048394e9dd977ee9f6925f7f7d137cff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page