Fixed error loadng model
Browse files`task.build_generator(models, cfg)` requires a list, this causes an error due to `model = models[0]`
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 |
-
|
35 |
TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
|
36 |
-
generator = task.build_generator(
|
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,
|
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 |
```
|