|
import os |
|
import shutil |
|
from os import listdir |
|
import gradio as gr |
|
|
|
with gr.Blocks() as demo: |
|
with gr.Row(): |
|
gr.Markdown("# RVC V2 - EASY GUI") |
|
with gr.Row(): |
|
with gr.Tab("Inference"): |
|
with gr.Row(): |
|
model_name = gr.Textbox(label="Model Name For Inference") |
|
with gr.Row(): |
|
input_path = gr.Audio(label="Input Audio Path", type="filepath") |
|
with gr.Row(): |
|
with gr.Accordion("Inference Settings"): |
|
pitch = gr.Slider(minimum=-12, maximum=12, step=1, label="Pitch", value=0) |
|
f0_method = gr.Dropdown(choices=["rmvpe", "pm", "harvest"], label="f0 Method", value="rmvpe") |
|
index_rate = gr.Slider(minimum=0, maximum=1, step=0.01, label="Index Rate", value=0.5) |
|
volume_normalization = gr.Slider(minimum=0, maximum=1, step=0.01, label="Volume Normalization", value=0) |
|
consonant_protection = gr.Slider(minimum=0, maximum=1, step=0.01, label="Consonant Protection", value=0.5) |
|
with gr.Row(): |
|
save_as = gr.Textbox(value="/content/RVC/audios/output_audio.wav", label="Output Audio Path") |
|
|
|
run_btn = gr.Button("Run Inference") |
|
with gr.Row(): |
|
output_message = gr.Textbox(label="Output Message",interactive=False) |
|
output_audio = gr.Audio(label="Output Audio",interactive=False) |
|
|
|
|
|
with gr.Tab("Training"): |
|
with gr.TabItem("Create Index and stuff"): |
|
model_name = gr.Textbox(label="Model Name (No spaces or symbols)") |
|
dataset_folder = gr.Textbox(label="Dataset Folder", value="/content/dataset") |
|
f0method = gr.Dropdown(["pm", "harvest", "rmvpe", "rmvpe_gpu"], label="F0 Method", value="rmvpe_gpu") |
|
preprocess_btn = gr.Button("Start Preprocessing") |
|
f0_btn = gr.Button("Extract F0 Feature") |
|
train_btn = gr.Button("Train Index") |
|
preprocess_output = gr.Textbox(label="Preprocessing Log") |
|
f0_output = gr.Textbox(label="F0 Feature Extraction Log") |
|
train_output = gr.Textbox(label="Training Log") |
|
|
|
|
|
|
|
|
|
|
|
demo.launch() |