Skip to main content

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.

Metadata

Release files for rvc-inferpy 0.10.2

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-inferpy 0.10.2
File Size Uploaded Provenance Actions
rvc_inferpy-0.10.2.tar.gz 52.8 kB Without provenance Details for rvc_inferpy-0.10.2.tar.gz

Built distribution (wheel)

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

Total release size: 109.2 kB

Release files / rvc_inferpy-0.10.2.tar.gz

Download URL rvc_inferpy-0.10.2.tar.gz
Size 52.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e21c4cbeba8090334f643eba2c9bc5f9f3da75095f50458b45c46114bff78f38
BLAKE2b-256 checksum
How to use checksums
c6897caa78e84b02e1ef29977206cae11781a5397431b753e905dc2df1ba3503
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / rvc_inferpy-0.10.2-py3-none-any.whl

Download URL rvc_inferpy-0.10.2-py3-none-any.whl
Size 56.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a60b89c1025f84f55fa67e270185fb2d47440d09027b6a1f60fd8f4f3d24dee
BLAKE2b-256 checksum
How to use checksums
f5f0ed4433cbbdb422e11793994688e5a15c7df6d8f407f52f1413dbf0bc3daf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Security for rvc-inferpy 0.10.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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