Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
### Information
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.

Please support the original RVC. This inference won't be possible to make without it.<br />
[![Original RVC Repository](https://img.shields.io/badge/Github-Original%20RVC%20Repository-blue?style=for-the-badge&logo=github)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)
Please support the Applio. This inference won't be possible to make without it.<br />
[![Original Applio](https://img.shields.io/badge/Github-Original%20Applio%20Repository-blue?style=for-the-badge&logo=github)](https://github.com/IAHispano/Applio)

#### Features
- Support V1 & V2 Model ✅
- Youtube Audio Downloader ✅
- Audio-Separator (Voice Splitter) [Internet required for downloading model] ✅
- Model Downloader ✅
- TTS Support

#### Currently Working
- Settings 🛠
- Microphone Support
- TTS Support
- Gradio WebUI

### Installation
Expand Down
Empty file removed assets/hubert/.gitkeep
Empty file.
Empty file removed assets/rmvpe/.gitkeep
Empty file.
Empty file removed audio_input/.gitkeep
Empty file.
68 changes: 68 additions & 0 deletions download_audio.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import os
import argparse
import yt_dlp


class MyLogger(object):
def debug(self, msg):
print("[DEBUG]", msg)

def warning(self, msg):
print("[WARNING]", msg)

def error(self, msg):
print("[ERROR]", msg)


def progress_hook(info):
status = info.get("status")
if status == "downloading":
downloaded = info.get("downloaded_bytes", 0)
total = info.get("total_bytes", info.get("total_bytes_estimate", 0))
if total:
percent = downloaded / total * 100
print(f"[DEBUG] Downloading: {percent:.2f}%")
elif status == "finished":
print("[DEBUG] Download finished, now converting to WAV...")


def download_youtube_audio(url, output_path):
os.makedirs(output_path, exist_ok=True)

outtmpl = os.path.join(output_path, "%(title)s.%(ext)s")

ydl_opts = {
"format": "bestaudio/best",
"outtmpl": outtmpl,
"logger": MyLogger(),
"progress_hooks": [progress_hook],
"postprocessors": [
{
"key": "FFmpegExtractAudio",
"preferredcodec": "wav",
"preferredquality": "192",
}
],
"verbose": True,
}

with yt_dlp.YoutubeDL(ydl_opts) as ydl:
ydl.download([url])


# Command-line interface for local usage.
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Download a YouTube video's audio as WAV using yt-dlp with debugging output."
)
parser.add_argument("url", help="The URL of the YouTube video to download.")
parser.add_argument(
"--output",
default="downloads",
help="Custom output directory (default: 'downloads').",
)
args = parser.parse_args()
download_youtube_audio(args.url, args.output)


# gyatt dyum made by NeoDev
87 changes: 87 additions & 0 deletions install.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
@echo off
setlocal enabledelayedexpansion
title RVC CLI Installer

echo Welcome to the RVC CLI Installer!
echo.

set "INSTALL_DIR=%cd%"
set "MINICONDA_DIR=%UserProfile%\Miniconda3"
set "ENV_DIR=%INSTALL_DIR%\env"
set "MINICONDA_URL=https://repo.anaconda.com/miniconda/Miniconda3-py39_23.9.0-0-Windows-x86_64.exe"
set "CONDA_EXE=%MINICONDA_DIR%\Scripts\conda.exe"

call :cleanup
call :install_miniconda
call :create_conda_env
call :install_dependencies

echo RVC CLI has been installed successfully!
echo.
pause
exit /b 0

:cleanup
echo Cleaning up unnecessary files...
for %%F in (Makefile Dockerfile docker-compose.yaml *.sh) do if exist "%%F" del "%%F"
echo Cleanup complete.
echo.
exit /b 0

:install_miniconda
if exist "%CONDA_EXE%" (
echo Miniconda already installed. Skipping installation.
exit /b 0
)

echo Miniconda not found. Starting download and installation...
powershell -Command "& {Invoke-WebRequest -Uri '%MINICONDA_URL%' -OutFile 'miniconda.exe'}"
if not exist "miniconda.exe" goto :download_error

start /wait "" miniconda.exe /InstallationType=JustMe /RegisterPython=0 /S /D=%MINICONDA_DIR%
if errorlevel 1 goto :install_error

del miniconda.exe
echo Miniconda installation complete.
echo.
exit /b 0

:create_conda_env
echo Creating Conda environment...
call "%MINICONDA_DIR%\_conda.exe" create --no-shortcuts -y -k --prefix "%ENV_DIR%" python=3.9
if errorlevel 1 goto :error
echo Conda environment created successfully.
echo.

if exist "%ENV_DIR%\python.exe" (
echo Installing specific pip version...
"%ENV_DIR%\python.exe" -m pip install "pip<24.1"
if errorlevel 1 goto :error
echo Pip installation complete.
echo.
)
exit /b 0

:install_dependencies
echo Installing dependencies...
call "%MINICONDA_DIR%\condabin\conda.bat" activate "%ENV_DIR%" || goto :error
pip install --upgrade setuptools || goto :error
pip install --no-cache-dir -r "%INSTALL_DIR%\requirements.txt" || goto :error
pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --upgrade --index-url https://download.pytorch.org/whl/cu121 || goto :error
call "%MINICONDA_DIR%\condabin\conda.bat" deactivate
echo Dependencies installation complete.
echo.
exit /b 0

:download_error
echo Download failed. Please check your internet connection and try again.
goto :error

:install_error
echo Miniconda installation failed.
goto :error

:error
echo An error occurred during installation. Please check the output above for details.
pause
exit /b 1
Loading