Spaces:
Runtime error
Runtime error
Update tts.py
Browse files
tts.py
CHANGED
@@ -5,12 +5,13 @@ models, cfg, task = load_model_ensemble_and_task_from_hf_hub(
|
|
5 |
"facebook/fastspeech2-en-ljspeech",
|
6 |
arg_overrides={"vocoder": "hifigan", "fp16": False}
|
7 |
)
|
8 |
-
print(models)
|
9 |
model = models
|
10 |
TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
|
11 |
generator = task.build_generator(model, cfg)
|
12 |
|
13 |
def tts(text):
|
|
|
|
|
14 |
|
15 |
sample = TTSHubInterface.get_model_input(task, text)
|
16 |
wav, rate = TTSHubInterface.get_prediction(task, model, generator, sample)
|
|
|
5 |
"facebook/fastspeech2-en-ljspeech",
|
6 |
arg_overrides={"vocoder": "hifigan", "fp16": False}
|
7 |
)
|
|
|
8 |
model = models
|
9 |
TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
|
10 |
generator = task.build_generator(model, cfg)
|
11 |
|
12 |
def tts(text):
|
13 |
+
|
14 |
+
print("Converting to TTS")
|
15 |
|
16 |
sample = TTSHubInterface.get_model_input(task, text)
|
17 |
wav, rate = TTSHubInterface.get_prediction(task, model, generator, sample)
|