Skip to content

Commit a53377c

Browse files
authored
Merge pull request #13 from kiurobox/master
new inference method
2 parents 240c81c + 8d89b6e commit a53377c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+14233
-5839
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88
### Information
99
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.
1010

11-
Please support the original RVC. This inference won't be possible to make without it.<br />
12-
[![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)
11+
Please support the Applio. This inference won't be possible to make without it.<br />
12+
[![Original Applio](https://img.shields.io/badge/Github-Original%20Applio%20Repository-blue?style=for-the-badge&logo=github)](https://github.com/IAHispano/Applio)
1313

1414
#### Features
1515
- Support V1 & V2 Model ✅
1616
- Youtube Audio Downloader ✅
1717
- Audio-Separator (Voice Splitter) [Internet required for downloading model]
1818
- Model Downloader ✅
19+
- TTS Support
1920

2021
#### Currently Working
2122
- Settings 🛠
2223
- Microphone Support
23-
- TTS Support
2424
- Gradio WebUI
2525

2626
### Installation

assets/hubert/.gitkeep

Whitespace-only changes.

assets/rmvpe/.gitkeep

Whitespace-only changes.

audio_input/.gitkeep

Whitespace-only changes.

download_audio.py

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import os
2+
import argparse
3+
import yt_dlp
4+
5+
6+
class MyLogger(object):
7+
def debug(self, msg):
8+
print("[DEBUG]", msg)
9+
10+
def warning(self, msg):
11+
print("[WARNING]", msg)
12+
13+
def error(self, msg):
14+
print("[ERROR]", msg)
15+
16+
17+
def progress_hook(info):
18+
status = info.get("status")
19+
if status == "downloading":
20+
downloaded = info.get("downloaded_bytes", 0)
21+
total = info.get("total_bytes", info.get("total_bytes_estimate", 0))
22+
if total:
23+
percent = downloaded / total * 100
24+
print(f"[DEBUG] Downloading: {percent:.2f}%")
25+
elif status == "finished":
26+
print("[DEBUG] Download finished, now converting to WAV...")
27+
28+
29+
def download_youtube_audio(url, output_path):
30+
os.makedirs(output_path, exist_ok=True)
31+
32+
outtmpl = os.path.join(output_path, "%(title)s.%(ext)s")
33+
34+
ydl_opts = {
35+
"format": "bestaudio/best",
36+
"outtmpl": outtmpl,
37+
"logger": MyLogger(),
38+
"progress_hooks": [progress_hook],
39+
"postprocessors": [
40+
{
41+
"key": "FFmpegExtractAudio",
42+
"preferredcodec": "wav",
43+
"preferredquality": "192",
44+
}
45+
],
46+
"verbose": True,
47+
}
48+
49+
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
50+
ydl.download([url])
51+
52+
53+
# Command-line interface for local usage.
54+
if __name__ == "__main__":
55+
parser = argparse.ArgumentParser(
56+
description="Download a YouTube video's audio as WAV using yt-dlp with debugging output."
57+
)
58+
parser.add_argument("url", help="The URL of the YouTube video to download.")
59+
parser.add_argument(
60+
"--output",
61+
default="downloads",
62+
help="Custom output directory (default: 'downloads').",
63+
)
64+
args = parser.parse_args()
65+
download_youtube_audio(args.url, args.output)
66+
67+
68+
# gyatt dyum made by NeoDev

install.bat

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
@echo off
2+
setlocal enabledelayedexpansion
3+
title RVC CLI Installer
4+
5+
echo Welcome to the RVC CLI Installer!
6+
echo.
7+
8+
set "INSTALL_DIR=%cd%"
9+
set "MINICONDA_DIR=%UserProfile%\Miniconda3"
10+
set "ENV_DIR=%INSTALL_DIR%\env"
11+
set "MINICONDA_URL=https://repo.anaconda.com/miniconda/Miniconda3-py39_23.9.0-0-Windows-x86_64.exe"
12+
set "CONDA_EXE=%MINICONDA_DIR%\Scripts\conda.exe"
13+
14+
call :cleanup
15+
call :install_miniconda
16+
call :create_conda_env
17+
call :install_dependencies
18+
19+
echo RVC CLI has been installed successfully!
20+
echo.
21+
pause
22+
exit /b 0
23+
24+
:cleanup
25+
echo Cleaning up unnecessary files...
26+
for %%F in (Makefile Dockerfile docker-compose.yaml *.sh) do if exist "%%F" del "%%F"
27+
echo Cleanup complete.
28+
echo.
29+
exit /b 0
30+
31+
:install_miniconda
32+
if exist "%CONDA_EXE%" (
33+
echo Miniconda already installed. Skipping installation.
34+
exit /b 0
35+
)
36+
37+
echo Miniconda not found. Starting download and installation...
38+
powershell -Command "& {Invoke-WebRequest -Uri '%MINICONDA_URL%' -OutFile 'miniconda.exe'}"
39+
if not exist "miniconda.exe" goto :download_error
40+
41+
start /wait "" miniconda.exe /InstallationType=JustMe /RegisterPython=0 /S /D=%MINICONDA_DIR%
42+
if errorlevel 1 goto :install_error
43+
44+
del miniconda.exe
45+
echo Miniconda installation complete.
46+
echo.
47+
exit /b 0
48+
49+
:create_conda_env
50+
echo Creating Conda environment...
51+
call "%MINICONDA_DIR%\_conda.exe" create --no-shortcuts -y -k --prefix "%ENV_DIR%" python=3.9
52+
if errorlevel 1 goto :error
53+
echo Conda environment created successfully.
54+
echo.
55+
56+
if exist "%ENV_DIR%\python.exe" (
57+
echo Installing specific pip version...
58+
"%ENV_DIR%\python.exe" -m pip install "pip<24.1"
59+
if errorlevel 1 goto :error
60+
echo Pip installation complete.
61+
echo.
62+
)
63+
exit /b 0
64+
65+
:install_dependencies
66+
echo Installing dependencies...
67+
call "%MINICONDA_DIR%\condabin\conda.bat" activate "%ENV_DIR%" || goto :error
68+
pip install --upgrade setuptools || goto :error
69+
pip install --no-cache-dir -r "%INSTALL_DIR%\requirements.txt" || goto :error
70+
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
71+
call "%MINICONDA_DIR%\condabin\conda.bat" deactivate
72+
echo Dependencies installation complete.
73+
echo.
74+
exit /b 0
75+
76+
:download_error
77+
echo Download failed. Please check your internet connection and try again.
78+
goto :error
79+
80+
:install_error
81+
echo Miniconda installation failed.
82+
goto :error
83+
84+
:error
85+
echo An error occurred during installation. Please check the output above for details.
86+
pause
87+
exit /b 1

0 commit comments

Comments
 (0)