Shokoufehhh commited on
Commit
c3b258c
·
verified ·
1 Parent(s): 46b8d3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,8 +1,8 @@
1
  import gradio as gr
2
- from speechbrain.pretrained import Tacotron2, HIFIGAN # Adjust imports for your use case
3
 
4
- # Load the MetricGAN model using Pretrained
5
- model = HIFIGAN.from_hparams(source="speechbrain/metricgan-plus-voicebank", savedir="tmpdir_metricgan")
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()