Changhan commited on
Commit
ca4bcbd
1 Parent(s): 1270843

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +58 -3
README.md CHANGED
@@ -5,8 +5,63 @@ tags:
5
  - fairseq
6
  - audio
7
  - text-to-speech
8
- language: en
9
  datasets:
10
- - ljspeech
11
  ---
12
- ## Example
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  - fairseq
6
  - audio
7
  - text-to-speech
8
+ language: ar
9
  datasets:
10
+ - common_voice
11
  ---
12
+ # tts_transformer-ar-cv7
13
+
14
+ [Transformer](https://arxiv.org/abs/1809.08895) text-to-speech model from fairseq S^2 ([paper](https://arxiv.org/abs/2109.06912)/[code](https://github.com/pytorch/fairseq/tree/main/examples/speech_synthesis)):
15
+ - Arabic
16
+ - Single-speaker male voice
17
+ - Trained on [Common Voice v7](https://commonvoice.mozilla.org/en/datasets)
18
+
19
+ ## Usage
20
+
21
+ ```python
22
+ from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
23
+ from fairseq.models.text_to_speech.hub_interface import TTSHubInterface
24
+ import IPython.display as ipd
25
+
26
+
27
+ models, cfg, task = load_model_ensemble_and_task_from_hf_hub(
28
+ "facebook/tts_transformer-ar-cv7",
29
+ arg_overrides={"vocoder": "hifigan", "fp16": False}
30
+ )
31
+ model = models[0]
32
+ TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
33
+ generator = task.build_generator(model, cfg)
34
+
35
+ text = "Hello, this is a test run."
36
+
37
+ sample = TTSHubInterface.get_model_input(task, text)
38
+ wav, rate = TTSHubInterface.get_prediction(task, model, generator, sample)
39
+
40
+ ipd.Audio(wav, rate=rate)
41
+ ```
42
+
43
+ See also [fairseq S^2 example](https://github.com/pytorch/fairseq/blob/main/examples/speech_synthesis/docs/common_voice_example.md).
44
+
45
+ ## Citation
46
+
47
+ ```bibtex
48
+ @inproceedings{wang-etal-2021-fairseq,
49
+ title = "fairseq S{\^{}}2: A Scalable and Integrable Speech Synthesis Toolkit",
50
+ author = "Wang, Changhan and
51
+ Hsu, Wei-Ning and
52
+ Adi, Yossi and
53
+ Polyak, Adam and
54
+ Lee, Ann and
55
+ Chen, Peng-Jen and
56
+ Gu, Jiatao and
57
+ Pino, Juan",
58
+ booktitle = "Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
59
+ month = nov,
60
+ year = "2021",
61
+ address = "Online and Punta Cana, Dominican Republic",
62
+ publisher = "Association for Computational Linguistics",
63
+ url = "https://aclanthology.org/2021.emnlp-demo.17",
64
+ doi = "10.18653/v1/2021.emnlp-demo.17",
65
+ pages = "143--152",
66
+ }
67
+ ```