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.10.2.tar.gz (52.8 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.10.2-py3-none-any.whl (56.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rvc_inferpy-0.10.2.tar.gz
  • Upload date:
  • Size: 52.8 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.10.2.tar.gz
Algorithm Hash digest
SHA256 e21c4cbeba8090334f643eba2c9bc5f9f3da75095f50458b45c46114bff78f38
MD5 0b2ae562f69196707fca8875025d45d9
BLAKE2b-256 c6897caa78e84b02e1ef29977206cae11781a5397431b753e905dc2df1ba3503

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rvc_inferpy-0.10.2-py3-none-any.whl
  • Upload date:
  • Size: 56.4 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.10.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2a60b89c1025f84f55fa67e270185fb2d47440d09027b6a1f60fd8f4f3d24dee
MD5 0637ce1a06ee30cdbdb128950d2a4736
BLAKE2b-256 f5f0ed4433cbbdb422e11793994688e5a15c7df6d8f407f52f1413dbf0bc3daf

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