Skip to content

ArkanDash/Advanced-RVC-Inference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced RVC Inference

Advanced RVC Inference presents itself as a state-of-the-art web UI crafted to streamline rapid and effortless inference. This comprehensive toolset encompasses a model downloader, a voice splitter, and the added efficiency of batch inference.

Features

  • Voice conversion with multiple pitch extraction methods
  • Model training capabilities
  • Batch inference support
  • Text-to-speech integration
  • Real-time voice conversion
  • Audio separation tools
  • Web UI interface with Gradio

Table of Contents

Installation

Using pip

pip install advanced-rvc-inference

Using uv (recommended)

# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# Create virtual environment
uv venv

# Activate virtual environment
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install the package
uv pip install -e .

For development

# Clone the repository
git clone https://github.com/ArkanDash/Advanced-RVC-Inference.git
cd Advanced-RVC-Inference

# Install in development mode
pip install -e .

Quick Start Guide

  1. Install the package using one of the methods above.

  2. Download prerequisites:

    python -c "from advanced_rvc_inference.core import run_prerequisites_script; run_prerequisites_script(pretraineds_hifigan=True, models=True, exe=True)"
  3. Launch the web interface:

    python -m advanced_rvc_inference.app
  4. Access the UI in your browser at the displayed URL (typically http://127.0.0.1:6969)

Using the Web UI

The Advanced RVC Inference web UI has several main tabs:

Inference Tab

  • Single: Convert a single audio file using your trained model
  • Batch: Convert multiple audio files at once
  • TTS: Generate speech from text and then convert it with voice cloning

Training Tab

  • Preprocess: Prepare your dataset for training
  • Extract: Extract features from your dataset
  • Train: Train your voice conversion model
  • Export Model: Download your trained model files

Additional Features

  • Realtime: Real-time voice conversion
  • Separation: Audio source separation
  • Voice Blender: Blend multiple models together
  • Plugins: Extend functionality with plugins
  • Settings: Configure application behavior

Command Line Usage

Basic Inference

python -m advanced_rvc_inference.core infer \
  --input_path path/to/input.wav \
  --output_path path/to/output.wav \
  --pth_path path/to/model.pth \
  --index_path path/to/index.index \
  --pitch 12 \
  --f0_method rmvpe \
  --index_rate 0.5

Batch Inference

python -m advanced_rvc_inference.core batch_infer \
  --input_folder path/to/input_folder \
  --output_folder path/to/output_folder \
  --pth_path path/to/model.pth \
  --index_path path/to/index.index \
  --pitch 12 \
  --f0_method rmvpe \
  --index_rate 0.5

Training

# Preprocess
python -m advanced_rvc_inference.core preprocess \
  --model_name my_model \
  --dataset_path path/to/dataset \
  --sample_rate 40000 \
  --cpu_cores 4

# Extract features
python -m advanced_rvc_inference.core extract \
  --model_name my_model \
  --f0_method rmvpe \
  --sample_rate 40000 \
  --embedder_model contentvec

# Train
python -m advanced_rvc_inference.core train \
  --model_name my_model \
  --save_every_epoch 10 \
  --total_epoch 200 \
  --sample_rate 40000 \
  --batch_size 8 \
  --pretrained True

Available Commands

  • infer: Single audio inference
  • batch_infer: Batch audio inference
  • tts: Text-to-speech inference
  • preprocess: Dataset preprocessing
  • extract: Feature extraction
  • train: Model training
  • index: Index file generation
  • model_information: Model details
  • model_blender: Model blending
  • tensorboard: Launch tensorboard
  • download: Model download
  • prerequisites: Install prerequisites
  • audio_analyzer: Audio analysis

Development Setup

Prerequisites

  • Python 3.8 or higher
  • Git
  • uv (optional but recommended)

Development Workflow

  1. Clone the repository:

    git clone https://github.com/ArkanDash/Advanced-RVC-Inference.git
    cd Advanced-RVC-Inference
  2. Install in development mode:

    pip install -e .
    # or with uv:
    uv pip install -e .
  3. Run the application:

    python -m advanced_rvc_inference.app
  4. Run tests to ensure everything works:

    python test_package.py

API Reference

Core Functions

from advanced_rvc_inference.core import run_infer_script, run_batch_infer_script, run_train_script

# Run inference with specified parameters
result = run_infer_script(
    pitch=12,
    index_rate=0.5,
    volume_envelope=1.0,
    protect=0.33,
    f0_method="rmvpe",
    input_path="path/to/input.wav",
    output_path="path/to/output.wav",
    pth_path="path/to/model.pth",
    index_path="path/to/index.index",
    split_audio=False,
    f0_autotune=False,
    clean_audio=False,
    export_format="WAV",
    embedder_model="contentvec",
)

# Batch inference
result = run_batch_infer_script(
    pitch=12,
    index_rate=0.5,
    f0_method="rmvpe",
    input_folder="path/to/input_folder",
    output_folder="path/to/output_folder",
    pth_path="path/to/model.pth",
    index_path="path/to/index.index",
    export_format="WAV",
    embedder_model="contentvec",
)

Model Training

from advanced_rvc_inference.core import run_train_script

# Train a model
result = run_train_script(
    model_name="my_model",
    save_every_epoch=10,
    total_epoch=200,
    sample_rate=40000,
    batch_size=8,
    gpu="0",
    pretrained=True,
    overtraining_detector=False,
)

Troubleshooting

Common Issues

CUDA Out of Memory Errors:

  • Reduce batch size in training
  • Use cache_dataset_in_gpu=False
  • Use checkpointing=True for memory-efficient training

Model Loading Issues:

  • Ensure model files (.pth, .index) are in the correct locations
  • Check file permissions and paths
  • Verify model compatibility with your installation

Audio Format Issues:

  • Convert audio to supported formats (WAV, MP3, FLAC, etc.)
  • Ensure correct sample rate (32000, 40000, 48000 Hz)
  • Use preprocessing tools to normalize audio

Web Interface Not Starting:

  • Check if the port is already in use
  • Try using --port option with a different port
  • Ensure all dependencies are installed

Logging Issues

To get more detailed logs, you can modify logging levels by setting environment variables:

PYTHONPATH=. python -m advanced_rvc_inference.app

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests to ensure everything works
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Code Standards

  • Use 4 spaces for indentation (not tabs)
  • Follow PEP 8 style guide
  • Write docstrings for public functions
  • Include type hints where appropriate
  • Add tests for new functionality

Testing

Run the test suite to ensure your changes don't break existing functionality:

python test_package.py

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you encounter any issues, please open an issue on GitHub.

For questions and discussions, join our community:

Releases

No releases published

Sponsor this project

Contributors 8

Languages