Nick256 commited on
Commit
55016da
1 Parent(s): 1acd7b5

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +77 -0
README.md ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - lg
4
+ tags:
5
+ - text-to-speech
6
+ - TTS
7
+ - speech-synthesis
8
+ - Tacotron2
9
+ license: apache-2.0
10
+ pipeline_tag: text-to-speech
11
+ ---
12
+
13
+ <iframe src="https://ghbtns.com/github-btn.html?user=speechbrain&repo=speechbrain&type=star&count=true&size=large&v=2" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>
14
+ <br/><br/>
15
+
16
+
17
+ # Text-to-Speech (TTS) with Tacotron2 trained on Common Voice
18
+
19
+ This repository provides all the necessary tools for Text-to-Speech (TTS) with SpeechBrain using a [Tacotron2](https://arxiv.org/abs/1712.05884) pretrained on [LJSpeech](https://keithito.com/LJ-Speech-Dataset/).
20
+
21
+ The pre-trained model takes in input a short text and produces a spectrogram in output. One can get the final waveform by applying a vocoder (e.g., HiFIGAN) on top of the generated spectrogram.
22
+
23
+
24
+ ## Install SpeechBrain
25
+
26
+ ```
27
+ pip install speechbrain
28
+ ```
29
+
30
+ Please notice that we encourage you to read our tutorials and learn more about
31
+ [SpeechBrain](https://speechbrain.github.io).
32
+
33
+ ### Perform Text-to-Speech (TTS)
34
+
35
+ ```python
36
+ import torchaudio
37
+ from speechbrain.inference.TTS import Tacotron2
38
+ from speechbrain.inference.vocoders import HIFIGAN
39
+
40
+ # Intialize TTS (tacotron2) and Vocoder (HiFIGAN)
41
+ tacotron2 = Tacotron2.from_hparams(source="Nick256/tts-tacotron2-commonvoice-single-female", savedir="tmpdir_tts")
42
+ hifi_gan = HIFIGAN.from_hparams(source="Nick256/tts-hifigan-commonvoice-single-female", savedir="tmpdir_vocoder")
43
+
44
+ # Running the TTS
45
+ mel_output, mel_length, alignment = tacotron2.encode_text("omuvubuka oyo ayagala nyo okulya")
46
+
47
+ # Running Vocoder (spectrogram-to-waveform)
48
+ waveforms = hifi_gan.decode_batch(mel_output)
49
+
50
+ # Save the waverform
51
+ torchaudio.save('example_TTS.wav',waveforms.squeeze(1), 22050)
52
+ ```
53
+
54
+
55
+ ### Limitations
56
+ The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets.
57
+
58
+ # **About SpeechBrain**
59
+ - Website: https://speechbrain.github.io/
60
+ - Code: https://github.com/speechbrain/speechbrain/
61
+ - HuggingFace: https://huggingface.co/speechbrain/
62
+
63
+
64
+ # **Citing SpeechBrain**
65
+ Please, cite SpeechBrain if you use it for your research or business.
66
+
67
+ ```bibtex
68
+ @misc{speechbrain,
69
+ title={{SpeechBrain}: A General-Purpose Speech Toolkit},
70
+ author={Mirco Ravanelli and Titouan Parcollet and Peter Plantinga and Aku Rouhe and Samuele Cornell and Loren Lugosch and Cem Subakan and Nauman Dawalatabad and Abdelwahab Heba and Jianyuan Zhong and Ju-Chieh Chou and Sung-Lin Yeh and Szu-Wei Fu and Chien-Feng Liao and Elena Rastorgueva and François Grondin and William Aris and Hwidong Na and Yan Gao and Renato De Mori and Yoshua Bengio},
71
+ year={2021},
72
+ eprint={2106.04624},
73
+ archivePrefix={arXiv},
74
+ primaryClass={eess.AS},
75
+ note={arXiv:2106.04624}
76
+ }
77
+ ```