Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
-
from speechbrain.
|
3 |
|
4 |
-
# Load the MetricGAN model
|
5 |
-
model =
|
6 |
|
7 |
# Define a function to enhance speech
|
8 |
def enhance_speech(audio):
|
@@ -21,4 +21,3 @@ iface = gr.Interface(
|
|
21 |
|
22 |
# Launch the Gradio interface
|
23 |
iface.launch()
|
24 |
-
|
|
|
1 |
import gradio as gr
|
2 |
+
from speechbrain.inference import SpectralMaskGAN
|
3 |
|
4 |
+
# Load the MetricGAN model
|
5 |
+
model = SpectralMaskGAN.from_hparams(source="speechbrain/metricgan-plus-voicebank", savedir="tmpdir_metricgan")
|
6 |
|
7 |
# Define a function to enhance speech
|
8 |
def enhance_speech(audio):
|
|
|
21 |
|
22 |
# Launch the Gradio interface
|
23 |
iface.launch()
|
|