Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
35 |
TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
|
36 |
-
generator = task.build_generator(
|
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,
|
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)
|