Update app.py
Browse files
app.py
CHANGED
@@ -79,10 +79,30 @@ def denoise(filename, ckpt_path = CHECKPOINT, out = "out.wav"):
|
|
79 |
|
80 |
return out
|
81 |
|
82 |
-
audio = gr.inputs.Audio(label = "Audio to denoise", type = 'filepath')
|
83 |
-
inputs = [audio]
|
84 |
-
outputs = gr.outputs.Audio(label = "Denoised audio", type = 'filepath')
|
85 |
-
|
86 |
-
title = "Speech Denoising in the Waveform Domain with Self-Attention from Nvidia"
|
87 |
-
|
88 |
-
gr.Interface(denoise, inputs, outputs, title=title, enable_queue=True).launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
return out
|
81 |
|
82 |
+
# audio = gr.inputs.Audio(label = "Audio to denoise", type = 'filepath')
|
83 |
+
# inputs = [audio]
|
84 |
+
# outputs = gr.outputs.Audio(label = "Denoised audio", type = 'filepath')
|
85 |
+
|
86 |
+
# title = "Speech Denoising in the Waveform Domain with Self-Attention from Nvidia"
|
87 |
+
|
88 |
+
# gr.Interface(denoise, inputs, outputs, title=title, enable_queue=True).launch()
|
89 |
+
|
90 |
+
|
91 |
+
mic_transcribe = gr.Interface(
|
92 |
+
fn=denoise,
|
93 |
+
inputs=[
|
94 |
+
gr.inputs.Audio(source="microphone", label="Audio to denoise", type="filepath", optional=True),
|
95 |
+
],
|
96 |
+
outputs=gr.outputs.Audio(label = "Denoised audio", type = 'filepath'),
|
97 |
+
layout="horizontal",
|
98 |
+
#theme="huggingface",
|
99 |
+
title="My Demo: Speech enhancement",
|
100 |
+
#description=(
|
101 |
+
# "Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the"
|
102 |
+
# f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers to transcribe audio files"
|
103 |
+
# " of arbitrary length."
|
104 |
+
# ),
|
105 |
+
allow_flagging="never",
|
106 |
+
)
|
107 |
+
|
108 |
+
mic_transcribe.launch()
|