Update app.py
Browse files
app.py
CHANGED
|
@@ -72,7 +72,7 @@ with gr.Blocks() as app:
|
|
| 72 |
|
| 73 |
with gr.Row():
|
| 74 |
train_audio = gr.File(label="Upload up to 50 training voice samples", file_types=[".wav"], file_count="multiple")
|
| 75 |
-
record_train = gr.Audio(
|
| 76 |
train_button = gr.Button("Train Model")
|
| 77 |
train_output = gr.Textbox()
|
| 78 |
train_button.click(train_voice_samples, inputs=train_audio, outputs=train_output)
|
|
@@ -80,7 +80,7 @@ with gr.Blocks() as app:
|
|
| 80 |
|
| 81 |
with gr.Row():
|
| 82 |
test_audio = gr.File(label="Upload a test voice file", file_types=[".wav"])
|
| 83 |
-
record_test = gr.Audio(
|
| 84 |
test_button = gr.Button("Test Voice")
|
| 85 |
test_output = gr.Textbox()
|
| 86 |
test_button.click(test_voice, inputs=test_audio, outputs=test_output)
|
|
|
|
| 72 |
|
| 73 |
with gr.Row():
|
| 74 |
train_audio = gr.File(label="Upload up to 50 training voice samples", file_types=[".wav"], file_count="multiple")
|
| 75 |
+
record_train = gr.Audio(sources=["microphone"], type="numpy", label="Record training voice")
|
| 76 |
train_button = gr.Button("Train Model")
|
| 77 |
train_output = gr.Textbox()
|
| 78 |
train_button.click(train_voice_samples, inputs=train_audio, outputs=train_output)
|
|
|
|
| 80 |
|
| 81 |
with gr.Row():
|
| 82 |
test_audio = gr.File(label="Upload a test voice file", file_types=[".wav"])
|
| 83 |
+
record_test = gr.Audio(sources=["microphone"], type="numpy", label="Record test voice")
|
| 84 |
test_button = gr.Button("Test Voice")
|
| 85 |
test_output = gr.Textbox()
|
| 86 |
test_button.click(test_voice, inputs=test_audio, outputs=test_output)
|