ashutoshzade commited on
Commit
5dbd087
·
verified ·
1 Parent(s): 61ee79e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -19
app.py CHANGED
@@ -1,19 +0,0 @@
1
- from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
2
- from fairseq.models.text_to_speech.hub_interface import TTSHubInterface
3
- import IPython.display as ipd
4
-
5
-
6
- models, cfg, task = load_model_ensemble_and_task_from_hf_hub(
7
- "facebook/fastspeech2-en-ljspeech",
8
- arg_overrides={"vocoder": "hifigan", "fp16": False}
9
- )
10
- model = models[0]
11
- TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
12
- generator = task.build_generator(model, cfg)
13
-
14
- text = "Hello, this is a test run."
15
-
16
- sample = TTSHubInterface.get_model_input(task, text)
17
- wav, rate = TTSHubInterface.get_prediction(task, model, generator, sample)
18
-
19
- ipd.Audio(wav, rate=rate)