Spaces:
Running
on
Zero
Running
on
Zero
roychao19477
commited on
Commit
·
a1a60de
1
Parent(s):
0efa60f
Upload
Browse files
app.py
CHANGED
|
@@ -81,16 +81,19 @@ def enhance(audio, do_pcs):
|
|
| 81 |
|
| 82 |
return orig_sr, out
|
| 83 |
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
gr.Audio(
|
| 88 |
-
gr.
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
)
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
|
| 96 |
demo.launch()
|
|
|
|
| 81 |
|
| 82 |
return orig_sr, out
|
| 83 |
|
| 84 |
+
with gr.Blocks() as demo:
|
| 85 |
+
gr.Markdown("## SEMamba Speech Enhancement demo")
|
| 86 |
+
with gr.Row():
|
| 87 |
+
upload = gr.Audio(label="Upload WAV", type="numpy")
|
| 88 |
+
record = gr.Audio(label="Record via mic", type="numpy")
|
| 89 |
+
pcs = gr.Checkbox(label="Apply PCS post-processing", value=False)
|
| 90 |
+
btn = gr.Button("Enhance")
|
| 91 |
+
out = gr.Audio(label="Enhanced WAV", type="numpy")
|
| 92 |
+
|
| 93 |
+
def runner(up, rec, do_pcs):
|
| 94 |
+
return enhance(up if up else rec, do_pcs)
|
| 95 |
+
|
| 96 |
+
btn.click(runner, [upload, record, pcs], out)
|
| 97 |
|
| 98 |
|
| 99 |
demo.launch()
|