MaykaGR commited on
Commit
2e5161a
verified
1 Parent(s): 451590a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,14 +31,14 @@ with gr.Blocks(theme=gr.themes.Ocean(primary_hue="pink", neutral_hue="indigo", f
31
  "facebook/fastspeech2-en-ljspeech",
32
  arg_overrides={"vocoder": "hifigan", "fp16": False}
33
  )
34
- model = models[0]
35
  TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
36
- generator = task.build_generator(model, cfg)
37
 
38
  text = processor.decode(out[0], skip_special_tokens=True)
39
 
40
  sample = TTSHubInterface.get_model_input(task, text)
41
- wav, rate = TTSHubInterface.get_prediction(task, model, generator, sample)
42
  ipd.Audio(wav, rate=rate)
43
 
44
  return processor.decode(out[0], skip_special_tokens=True)
 
31
  "facebook/fastspeech2-en-ljspeech",
32
  arg_overrides={"vocoder": "hifigan", "fp16": False}
33
  )
34
+ ble = models[0]
35
  TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
36
+ generator = task.build_generator(ble, cfg)
37
 
38
  text = processor.decode(out[0], skip_special_tokens=True)
39
 
40
  sample = TTSHubInterface.get_model_input(task, text)
41
+ wav, rate = TTSHubInterface.get_prediction(task, ble, generator, sample)
42
  ipd.Audio(wav, rate=rate)
43
 
44
  return processor.decode(out[0], skip_special_tokens=True)