Skip to main content

Inference tools for RVC

Project description

RVC INFER PY

rvc_inferpy is a Python library designed for audio inference using RVC (Retrieval-based Voice Conversion). It provides a straightforward interface to process audio files with various configurable parameters.

Installation

Install the package using pip:

pip install rvc-inferpy

Usage

Here's a simple example demonstrating how to use the library:

from rvc_inferpy import infer_audio

inferred_audio = infer_audio(
    MODEL_NAME="model_name_here",       # Name or path to the RVC model
    SOUND_PATH="path_to_audio.wav",    # Path to the input audio file
    F0_CHANGE=0,                       # Change in fundamental frequency
    F0_METHOD="crepe",                 # F0 extraction method ("crepe", "dio", etc.)
    MIN_PITCH=50,                      # Minimum pitch value
    MAX_PITCH=800,                     # Maximum pitch value
    CREPE_HOP_LENGTH=128,              # Hop length for Crepe
    INDEX_RATE=1.0,                    # Index rate for model inference
    FILTER_RADIUS=3,                   # Radius for smoothing filters
    RMS_MIX_RATE=0.75,                 # Mixing rate for RMS
    PROTECT=0.33,                      # Protect level to prevent overfitting
    SPLIT_INFER=True,                  # Whether to split audio for inference
    MIN_SILENCE=0.5,                   # Minimum silence duration for splitting
    SILENCE_THRESHOLD=-40,             # Silence threshold in dB
    SEEK_STEP=10,                      # Seek step in milliseconds
    KEEP_SILENCE=0.1,                  # Keep silence duration in seconds
    FORMANT_SHIFT=0.0,                 # Amount of formant shifting
    QUEFRENCY=0.0,                     # Cepstrum quefrency adjustment
    TIMBRE=1.0,                        # Timbre preservation level
    F0_AUTOTUNE=False,                 # Enable or disable F0 autotuning
    OUTPUT_FORMAT="wav"                # Desired output format (e.g., "wav", "mp3")
)

Parameters

  • MODEL_NAME: Name or path of the RVC model to use.
  • SOUND_PATH: Path to the input audio file to be processed.
  • F0_CHANGE: Adjusts the fundamental frequency (F0) of the audio.
  • F0_METHOD: Method for extracting F0 (e.g., "crepe", "dio").
  • MIN_PITCH / MAX_PITCH: Minimum and maximum pitch values for processing.
  • CREPE_HOP_LENGTH: Hop length parameter for the Crepe method.
  • INDEX_RATE: Determines the index rate for the inference model.
  • FILTER_RADIUS: Radius used for smoothing filters.
  • RMS_MIX_RATE: Mix rate for RMS adjustments.
  • PROTECT: Protects specific audio characteristics from overfitting.
  • SPLIT_INFER: Splits the audio for inference if set to True.
  • MIN_SILENCE: Minimum silence duration for splitting audio (in seconds).
  • SILENCE_THRESHOLD: Threshold to detect silence (in decibels).
  • SEEK_STEP: Seek step in milliseconds during splitting.
  • KEEP_SILENCE: Duration of silence to retain after processing.
  • FORMANT_SHIFT: Amount of formant shifting applied.
  • QUEFRENCY: Adjusts the quefrency in the cepstrum domain.
  • TIMBRE: Controls timbre preservation during processing.
  • F0_AUTOTUNE: Enables or disables F0 autotuning.
  • OUTPUT_FORMAT: Specifies the output file format (e.g., "wav", "mp3").

Output

The function returns an audio object with the processed audio based on the provided parameters.

License

This project is licensed under the MIT License.


For more details, visit the 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.2.0.tar.gz (47.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.2.0-py3-none-any.whl (51.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rvc_inferpy-0.2.0.tar.gz
  • Upload date:
  • Size: 47.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for rvc_inferpy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 549dc2f2ef38e148cbcb3a947d1b3b285256f305c3d8704a122b76cf9ea42a2f
MD5 1f6e77eca23315f80618a1a4dbed298e
BLAKE2b-256 24f557be2005f14fc72fe4c6f96bdb62bb474fe015f9094b55996e4ce863a9fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rvc_inferpy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 51.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for rvc_inferpy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 521c0c2c94233b441856a4ff79b832613d83f1009187e67550971130fc3f609a
MD5 31ce84d6c61496b105fc887a49b3046e
BLAKE2b-256 70466c4a035ef89527462b1e2a1272b295748c1a100645ec96699adc43f963d2

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