knoriy commited on
Commit
3b880c6
1 Parent(s): a3e3e5e

Fixed error loadng model

Browse files

`task.build_generator(models, cfg)` requires a list, this causes an error due to `model = models[0]`

Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -31,14 +31,14 @@ models, cfg, task = load_model_ensemble_and_task_from_hf_hub(
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 = "Hello, this is a test run."
39
 
40
  sample = TTSHubInterface.get_model_input(task, text)
41
- wav, rate = TTSHubInterface.get_prediction(task, model, generator, sample)
42
 
43
  ipd.Audio(wav, rate=rate)
44
  ```
31
  "facebook/fastspeech2-en-ljspeech",
32
  arg_overrides={"vocoder": "hifigan", "fp16": False}
33
  )
34
+
35
  TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
36
+ generator = task.build_generator(models, cfg)
37
 
38
  text = "Hello, this is a test run."
39
 
40
  sample = TTSHubInterface.get_model_input(task, text)
41
+ wav, rate = TTSHubInterface.get_prediction(task, models[0], generator, sample)
42
 
43
  ipd.Audio(wav, rate=rate)
44
  ```