Spaces:
Runtime error
Runtime error
divakaivan
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -131,38 +131,7 @@ def predict(text, speaker):
|
|
131 |
|
132 |
|
133 |
title = "Glaswegian TTS"
|
134 |
-
|
135 |
-
description = """
|
136 |
-
The <b>SpeechT5</b> model is pre-trained on text as well as speech inputs, with targets that are also a mix of text and speech.
|
137 |
-
By pre-training on text and speech at the same time, it learns unified representations for both, resulting in improved modeling capabilities.
|
138 |
-
SpeechT5 can be fine-tuned for different speech tasks. This space demonstrates the <b>text-to-speech</b> (TTS) checkpoint for the English language.
|
139 |
-
See also the <a href="https://huggingface.co/spaces/Matthijs/speecht5-asr-demo">speech recognition (ASR) demo</a>
|
140 |
-
and the <a href="https://huggingface.co/spaces/Matthijs/speecht5-vc-demo">voice conversion demo</a>.
|
141 |
-
Refer to <a href="https://colab.research.google.com/drive/1i7I5pzBcU3WDFarDnzweIj4-sVVoIUFJ">this Colab notebook</a> to learn how to fine-tune the SpeechT5 TTS model on your own dataset or language.
|
142 |
-
<b>How to use:</b> Enter some English text and choose a speaker. The output is a mel spectrogram, which is converted to a mono 16 kHz waveform by the
|
143 |
-
HiFi-GAN vocoder. Because the model always applies random dropout, each attempt will give slightly different results.
|
144 |
-
The <em>Surprise Me!</em> option creates a completely randomized speaker.
|
145 |
-
"""
|
146 |
-
|
147 |
-
article = """
|
148 |
-
<div style='margin:20px auto;'>
|
149 |
-
<p>References: <a href="https://arxiv.org/abs/2110.07205">SpeechT5 paper</a> |
|
150 |
-
<a href="https://github.com/microsoft/SpeechT5/">original GitHub</a> |
|
151 |
-
<a href="https://huggingface.co/mechanicalsea/speecht5-tts">original weights</a></p>
|
152 |
-
<pre>
|
153 |
-
@article{Ao2021SpeechT5,
|
154 |
-
title = {SpeechT5: Unified-Modal Encoder-Decoder Pre-training for Spoken Language Processing},
|
155 |
-
author = {Junyi Ao and Rui Wang and Long Zhou and Chengyi Wang and Shuo Ren and Yu Wu and Shujie Liu and Tom Ko and Qing Li and Yu Zhang and Zhihua Wei and Yao Qian and Jinyu Li and Furu Wei},
|
156 |
-
eprint={2110.07205},
|
157 |
-
archivePrefix={arXiv},
|
158 |
-
primaryClass={eess.AS},
|
159 |
-
year={2021}
|
160 |
-
}
|
161 |
-
</pre>
|
162 |
-
<p>Speaker embeddings were generated from <a href="http://www.festvox.org/cmu_arctic/">CMU ARCTIC</a> using <a href="https://huggingface.co/mechanicalsea/speecht5-vc/blob/main/manifest/utils/prep_cmu_arctic_spkemb.py">this script</a>.</p>
|
163 |
-
</div>
|
164 |
-
"""
|
165 |
-
|
166 |
|
167 |
gr.Interface(
|
168 |
fn=predict,
|
@@ -173,6 +142,5 @@ gr.Interface(
|
|
173 |
gr.Audio(label="Generated Speech", type="numpy"),
|
174 |
],
|
175 |
title=title,
|
176 |
-
description=description,
|
177 |
article=article,
|
178 |
).launch()
|
|
|
131 |
|
132 |
|
133 |
title = "Glaswegian TTS"
|
134 |
+
article = "Model fine-tuned and gradle demo generated thanks to this notebook: https://colab.research.google.com/drive/1i7I5pzBcU3WDFarDnzweIj4-sVVoIUFJ#scrollTo=wm7B3zxrumfF"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
gr.Interface(
|
137 |
fn=predict,
|
|
|
142 |
gr.Audio(label="Generated Speech", type="numpy"),
|
143 |
],
|
144 |
title=title,
|
|
|
145 |
article=article,
|
146 |
).launch()
|