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.8.1.tar.gz (50.5 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.8.1-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rvc_inferpy-0.8.1.tar.gz
  • Upload date:
  • Size: 50.5 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.8.1.tar.gz
Algorithm Hash digest
SHA256 7a4f42994b5b9db1e3b93ed1583c07da979832561c6a9c3c529dc54435c04859
MD5 54add6b991eb881b7e7c36305f8c263c
BLAKE2b-256 e5ab752717314bcd1288a67754351f18e4c0ea59c9e3ffe36012fc8484885a04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rvc_inferpy-0.8.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.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e851ad806018b55ffc48fc5bdac92270f4a1088df4830f6ae67ebbbd49c117b
MD5 63377a7980f3b7c37cd4e0a4e6237def
BLAKE2b-256 cf1d83ced633fbd71e7ad35e7f0fdebc04b50fe4d3e06b368b3b0da7f6e7c606

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