Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,11 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from infer_rvc_python import BaseLoader
|
| 3 |
|
| 4 |
-
def convert_audio(audio_file,
|
| 5 |
converter = BaseLoader(only_cpu=True, hubert_path=None, rmvpe_path=None)
|
| 6 |
|
| 7 |
# Apply the configuration
|
| 8 |
converter.apply_conf(
|
| 9 |
-
tag=tag,
|
| 10 |
file_model=file_model,
|
| 11 |
pitch_algo=pitch_algo,
|
| 12 |
pitch_lvl=pitch_lvl,
|
|
@@ -29,18 +28,15 @@ def convert_audio(audio_file, tag, file_model, pitch_algo, pitch_lvl, file_index
|
|
| 29 |
|
| 30 |
with gr.Blocks() as demo:
|
| 31 |
gr.Markdown("EV RVC")
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
envelope_ratio = gr.Slider(label="Envelope Ratio", minimum=0, maximum=1, step=0.01, value=0.25)
|
| 42 |
-
consonant_breath_protection = gr.Slider(label="Consonant Breath Protection", minimum=0, maximum=1, step=0.01, value=0.33)
|
| 43 |
-
|
| 44 |
convert_button = gr.Button("Convert Audio")
|
| 45 |
output_audio = gr.Audio(label="Converted Audio")
|
| 46 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from infer_rvc_python import BaseLoader
|
| 3 |
|
| 4 |
+
def convert_audio(audio_file, file_model, pitch_algo, pitch_lvl, file_index, index_influence, respiration_median_filtering, envelope_ratio, consonant_breath_protection):
|
| 5 |
converter = BaseLoader(only_cpu=True, hubert_path=None, rmvpe_path=None)
|
| 6 |
|
| 7 |
# Apply the configuration
|
| 8 |
converter.apply_conf(
|
|
|
|
| 9 |
file_model=file_model,
|
| 10 |
pitch_algo=pitch_algo,
|
| 11 |
pitch_lvl=pitch_lvl,
|
|
|
|
| 28 |
|
| 29 |
with gr.Blocks() as demo:
|
| 30 |
gr.Markdown("EV RVC")
|
| 31 |
+
audio_file = gr.Audio(label="Upload Audio", type="filepath")
|
| 32 |
+
file_index = gr.File(label="File Index")
|
| 33 |
+
file_model = gr.File(label="Model File")
|
| 34 |
+
pitch_algo = gr.Dropdown(label="Pitch Algorithm", choices=["pm", "crepe", " harvest", "rmvpe" "rmvpe+"], value="rmvpe+")
|
| 35 |
+
pitch_lvl = gr.Slider(label="Pitch Level", minimum=-12, maximum=12, step=1, value=0)
|
| 36 |
+
index_influence = gr.Slider(label="Index Influence", minimum=0, maximum=1, step=0.01, value=0.66)
|
| 37 |
+
respiration_median_filtering = gr.Slider(label="Respiration Median Filtering", minimum=0, maximum=10, step=1, value=3)
|
| 38 |
+
envelope_ratio = gr.Slider(label="Envelope Ratio", minimum=0, maximum=1, step=0.01, value=0.25)
|
| 39 |
+
consonant_breath_protection = gr.Slider(label="Consonant Breath Protection", minimum=0, maximum=1, step=0.01, value=0.33)
|
|
|
|
|
|
|
|
|
|
| 40 |
convert_button = gr.Button("Convert Audio")
|
| 41 |
output_audio = gr.Audio(label="Converted Audio")
|
| 42 |
|