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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,8 +1,8 @@
1
  import gradio as gr
2
- from speechbrain.inference import MetricGAN
3
 
4
- # Load the MetricGAN model from Hugging Face
5
- model = MetricGAN.from_hparams(source="speechbrain/metricgan-plus-voicebank", savedir="tmpdir_metricgan")
6
 
7
  # Define a function to enhance speech
8
  def enhance_speech(audio):
 
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):