Update demo.py
Browse files
demo.py
CHANGED
|
@@ -30,9 +30,7 @@ with gr.Blocks(title="💻 RVC V2",theme=gr.themes.Soft(primary_hue="blue",neutr
|
|
| 30 |
with gr.Row():
|
| 31 |
with gr.Column():
|
| 32 |
with gr.Row():
|
| 33 |
-
dropbox = gr.
|
| 34 |
-
with gr.Row():
|
| 35 |
-
record_button=gr.Audio(source="microphone", label="OR Record audio.", type="filepath")
|
| 36 |
with gr.Row():
|
| 37 |
paths_for_files = lambda path:[os.path.abspath(os.path.join(path, f)) for f in os.listdir(path) if os.path.splitext(f)[1].lower() in ('.mp3', '.wav', '.flac', '.ogg')]
|
| 38 |
input_audio0 = gr.Dropdown(
|
|
@@ -48,14 +46,6 @@ with gr.Blocks(title="💻 RVC V2",theme=gr.themes.Soft(primary_hue="blue",neutr
|
|
| 48 |
outputs=[audio_player],
|
| 49 |
fn=lambda path: {"value":path,"__type__":"update"} if os.path.exists(path) else None
|
| 50 |
)
|
| 51 |
-
record_button.stop_recording(
|
| 52 |
-
fn=lambda audio:audio, #TODO save wav lambda
|
| 53 |
-
inputs=[record_button],
|
| 54 |
-
outputs=[input_audio0])
|
| 55 |
-
dropbox.upload(
|
| 56 |
-
fn=lambda audio:audio.name,
|
| 57 |
-
inputs=[dropbox],
|
| 58 |
-
outputs=[input_audio0])
|
| 59 |
with gr.Column():
|
| 60 |
with gr.Accordion("Change Index", open=False):
|
| 61 |
file_index2 = gr.Dropdown(
|
|
|
|
| 30 |
with gr.Row():
|
| 31 |
with gr.Column():
|
| 32 |
with gr.Row():
|
| 33 |
+
dropbox = gr.Audio(label="Drop your audio here & hit the Reload button.")
|
|
|
|
|
|
|
| 34 |
with gr.Row():
|
| 35 |
paths_for_files = lambda path:[os.path.abspath(os.path.join(path, f)) for f in os.listdir(path) if os.path.splitext(f)[1].lower() in ('.mp3', '.wav', '.flac', '.ogg')]
|
| 36 |
input_audio0 = gr.Dropdown(
|
|
|
|
| 46 |
outputs=[audio_player],
|
| 47 |
fn=lambda path: {"value":path,"__type__":"update"} if os.path.exists(path) else None
|
| 48 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
with gr.Column():
|
| 50 |
with gr.Accordion("Change Index", open=False):
|
| 51 |
file_index2 = gr.Dropdown(
|