Text-to-Speech
Fairseq
English
audio
sanchit-gandhi HF staff commited on
Commit
f4dd35d
1 Parent(s): a3e3e5e

Update codesnippet in README

Browse files
Files changed (1) hide show
  1. README.md +7 -1
README.md CHANGED
@@ -21,6 +21,12 @@ widget:
21
 
22
  ## Usage
23
 
 
 
 
 
 
 
24
  ```python
25
  from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
26
  from fairseq.models.text_to_speech.hub_interface import TTSHubInterface
@@ -33,7 +39,7 @@ models, cfg, task = load_model_ensemble_and_task_from_hf_hub(
33
  )
34
  model = models[0]
35
  TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
36
- generator = task.build_generator(model, cfg)
37
 
38
  text = "Hello, this is a test run."
39
 
 
21
 
22
  ## Usage
23
 
24
+ Install dependencies:
25
+ ```sh
26
+ pip install fairseq sentencepiece g2p_en
27
+ ```
28
+
29
+ Perform a generation:
30
  ```python
31
  from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
32
  from fairseq.models.text_to_speech.hub_interface import TTSHubInterface
 
39
  )
40
  model = models[0]
41
  TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
42
+ generator = task.build_generator([model], cfg)
43
 
44
  text = "Hello, this is a test run."
45