|
import os |
|
import shutil |
|
from os import listdir |
|
import gradio as gr |
|
|
|
with gr.Blocks(theme="Ryouko-Yamanda65777/ryo") 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", interactive=True) |
|
index_rate = gr.Slider(minimum=0, maximum=1, step=0.01, label="Index Rate", value=0.5, interactive=True) |
|
volume_normalization = gr.Slider(minimum=0, maximum=1, step=0.01, label="Volume Normalization", value=0, interactive=True) |
|
consonant_protection = gr.Slider(minimum=0, maximum=1, step=0.01, label="Consonant Protection", value=0.5, interactive=True) |
|
with gr.Row(): |
|
save_as = gr.Textbox(value="/content/RVC/audios/output_audio.wav", label="Output Audio Path", interactive=True) |
|
|
|
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", interactive=True) |
|
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") |
|
|
|
|
|
|
|
|
|
with gr.TabItem("Train Your Model"): |
|
model_name_input = gr.Textbox(label="Model Name", placeholder="Enter the model name", interactive=True) |
|
epochs_slider = gr.Slider(minimum=50, maximum=2000, value=200, step=10, label="Epochs", interactive=True) |
|
save_frequency_slider = gr.Slider(minimum=10, maximum=100, value=50, step=10, label="Save Frequency", interactive=True) |
|
batch_size_slider = gr.Slider(minimum=1, maximum=20, value=8, step=1, label="Batch Size", interactive=True) |
|
|
|
train_button = gr.Button("Train Model") |
|
training_output = gr.Textbox(label="Training Log", interactive=False) |
|
|
|
|
|
|
|
demo.launch() |