Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -38,14 +38,14 @@ with gr.Blocks(theme=gr.themes.Ocean(primary_hue="pink", neutral_hue="indigo", f
|
|
38 |
"facebook/fastspeech2-en-ljspeech",
|
39 |
arg_overrides={"vocoder": "hifigan", "fp16": False}
|
40 |
)
|
41 |
-
|
42 |
TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
|
43 |
-
generator = task.build_generator(
|
44 |
|
45 |
text = texto
|
46 |
|
47 |
sample = TTSHubInterface.get_model_input(task, text)
|
48 |
-
wav, rate = TTSHubInterface.get_prediction(task,
|
49 |
|
50 |
return ipd.Audio(wav, rate=rate)
|
51 |
|
|
|
38 |
"facebook/fastspeech2-en-ljspeech",
|
39 |
arg_overrides={"vocoder": "hifigan", "fp16": False}
|
40 |
)
|
41 |
+
modelA = models[0]
|
42 |
TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
|
43 |
+
generator = task.build_generator(modelA, cfg)
|
44 |
|
45 |
text = texto
|
46 |
|
47 |
sample = TTSHubInterface.get_model_input(task, text)
|
48 |
+
wav, rate = TTSHubInterface.get_prediction(task, modelA, generator, sample)
|
49 |
|
50 |
return ipd.Audio(wav, rate=rate)
|
51 |
|