restructuring the MC
#4
by
Ezi
- opened
README.md
CHANGED
|
@@ -15,7 +15,7 @@ This model was introduced in [SpeechT5: Unified-Modal Encoder-Decoder Pre-Traini
|
|
| 15 |
|
| 16 |
SpeechT5 was first released in [this repository](https://github.com/microsoft/SpeechT5/), [original weights](https://huggingface.co/mechanicalsea/speecht5-tts). The license used is [MIT](https://github.com/microsoft/SpeechT5/blob/main/LICENSE).
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
## Model Description
|
| 21 |
|
|
@@ -25,12 +25,66 @@ Leveraging large-scale unlabeled speech and text data, we pre-train SpeechT5 to
|
|
| 25 |
|
| 26 |
Extensive evaluations show the superiority of the proposed SpeechT5 framework on a wide variety of spoken language processing tasks, including automatic speech recognition, speech synthesis, speech translation, voice conversion, speech enhancement, and speaker identification.
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
## How to Get Started With the Model
|
| 29 |
|
| 30 |
Use the code below to convert text into a mono 16 kHz speech waveform.
|
| 31 |
|
| 32 |
```python
|
| 33 |
from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan
|
|
|
|
| 34 |
import torch
|
| 35 |
import soundfile as sf
|
| 36 |
|
|
@@ -49,13 +103,106 @@ speech = model.generate_speech(inputs["input_ids"], speaker_embeddings, vocoder=
|
|
| 49 |
sf.write("speech.wav", speech.numpy(), samplerate=16000)
|
| 50 |
```
|
| 51 |
|
| 52 |
-
|
| 53 |
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
-
|
| 57 |
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
**BibTeX:**
|
| 61 |
|
|
@@ -69,3 +216,24 @@ Currently, both the feature extractor and model support PyTorch.
|
|
| 69 |
pages={5723--5738},
|
| 70 |
}
|
| 71 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
SpeechT5 was first released in [this repository](https://github.com/microsoft/SpeechT5/), [original weights](https://huggingface.co/mechanicalsea/speecht5-tts). The license used is [MIT](https://github.com/microsoft/SpeechT5/blob/main/LICENSE).
|
| 17 |
|
| 18 |
+
|
| 19 |
|
| 20 |
## Model Description
|
| 21 |
|
|
|
|
| 25 |
|
| 26 |
Extensive evaluations show the superiority of the proposed SpeechT5 framework on a wide variety of spoken language processing tasks, including automatic speech recognition, speech synthesis, speech translation, voice conversion, speech enhancement, and speaker identification.
|
| 27 |
|
| 28 |
+
- **Developed by:** Junyi Ao, Rui Wang, Long Zhou, Chengyi Wang, Shuo Ren, Yu Wu, Shujie Liu, Tom Ko, Qing Li, Yu Zhang, Zhihua Wei, Yao Qian, Jinyu Li, Furu Wei.
|
| 29 |
+
- **Shared by [optional]:** [Matthijs Hollemans](https://huggingface.co/Matthijs)
|
| 30 |
+
- **Model type:** text-to-speech
|
| 31 |
+
- **Language(s) (NLP):** [More Information Needed]
|
| 32 |
+
- **License:** [MIT](https://github.com/microsoft/SpeechT5/blob/main/LICENSE)
|
| 33 |
+
- **Finetuned from model [optional]:** [More Information Needed]
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
## Model Sources [optional]
|
| 37 |
+
|
| 38 |
+
<!-- Provide the basic links for the model. -->
|
| 39 |
+
|
| 40 |
+
- **Repository:** [https://github.com/microsoft/SpeechT5/]
|
| 41 |
+
- **Paper:** [https://arxiv.org/pdf/2110.07205.pdf]
|
| 42 |
+
- **Blog Post:** [https://huggingface.co/blog/speecht5]
|
| 43 |
+
- **Demo:** [https://huggingface.co/spaces/Matthijs/speecht5-tts-demo]
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
# Uses
|
| 47 |
+
|
| 48 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 49 |
+
|
| 50 |
+
## Direct Use
|
| 51 |
+
|
| 52 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 53 |
+
|
| 54 |
+
You can use this model for speech synthesis. See the [model hub](https://huggingface.co/models?search=speecht5) to look for fine-tuned versions on a task that interests you.
|
| 55 |
+
|
| 56 |
+
## Downstream Use [optional]
|
| 57 |
+
|
| 58 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
| 59 |
+
|
| 60 |
+
[More Information Needed]
|
| 61 |
+
|
| 62 |
+
## Out-of-Scope Use
|
| 63 |
+
|
| 64 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 65 |
+
|
| 66 |
+
[More Information Needed]
|
| 67 |
+
|
| 68 |
+
# Bias, Risks, and Limitations
|
| 69 |
+
|
| 70 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 71 |
+
|
| 72 |
+
[More Information Needed]
|
| 73 |
+
|
| 74 |
+
## Recommendations
|
| 75 |
+
|
| 76 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 77 |
+
|
| 78 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 79 |
+
|
| 80 |
+
|
| 81 |
## How to Get Started With the Model
|
| 82 |
|
| 83 |
Use the code below to convert text into a mono 16 kHz speech waveform.
|
| 84 |
|
| 85 |
```python
|
| 86 |
from transformers import SpeechT5Processor, SpeechT5ForTextToSpeech, SpeechT5HifiGan
|
| 87 |
+
from datasets import load_dataset
|
| 88 |
import torch
|
| 89 |
import soundfile as sf
|
| 90 |
|
|
|
|
| 103 |
sf.write("speech.wav", speech.numpy(), samplerate=16000)
|
| 104 |
```
|
| 105 |
|
| 106 |
+
# Training Details
|
| 107 |
|
| 108 |
+
## Training Data
|
| 109 |
+
|
| 110 |
+
<!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 111 |
+
|
| 112 |
+
LibriTTS
|
| 113 |
+
|
| 114 |
+
## Training Procedure
|
| 115 |
+
|
| 116 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 117 |
+
|
| 118 |
+
### Preprocessing [optional]
|
| 119 |
+
|
| 120 |
+
Leveraging large-scale unlabeled speech and text data, we pre-train SpeechT5 to learn a unified-modal representation, hoping to improve the modeling capability for both speech and text.
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
### Training hyperparameters
|
| 124 |
+
- **Precision:** [More Information Needed] <!--fp16, bf16, fp8, fp32 -->
|
| 125 |
+
- **Regime:** [More Information Needed] <!--mixed precision or not -->
|
| 126 |
+
|
| 127 |
+
### Speeds, Sizes, Times [optional]
|
| 128 |
+
|
| 129 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 130 |
+
|
| 131 |
+
[More Information Needed]
|
| 132 |
+
|
| 133 |
+
# Evaluation
|
| 134 |
+
|
| 135 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 136 |
+
|
| 137 |
+
## Testing Data, Factors & Metrics
|
| 138 |
+
|
| 139 |
+
### Testing Data
|
| 140 |
+
|
| 141 |
+
<!-- This should link to a Data Card if possible. -->
|
| 142 |
|
| 143 |
+
[More Information Needed]
|
| 144 |
|
| 145 |
+
### Factors
|
| 146 |
+
|
| 147 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 148 |
+
|
| 149 |
+
[More Information Needed]
|
| 150 |
+
|
| 151 |
+
### Metrics
|
| 152 |
+
|
| 153 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 154 |
+
|
| 155 |
+
[More Information Needed]
|
| 156 |
+
|
| 157 |
+
## Results
|
| 158 |
+
|
| 159 |
+
[More Information Needed]
|
| 160 |
+
|
| 161 |
+
### Summary
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
# Model Examination [optional]
|
| 166 |
+
|
| 167 |
+
<!-- Relevant interpretability work for the model goes here -->
|
| 168 |
+
|
| 169 |
+
Extensive evaluations show the superiority of the proposed SpeechT5 framework on a wide variety of spoken language processing tasks, including automatic speech recognition, speech synthesis, speech translation, voice conversion, speech enhancement, and speaker identification.
|
| 170 |
+
|
| 171 |
+
# Environmental Impact
|
| 172 |
+
|
| 173 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 174 |
+
|
| 175 |
+
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 176 |
+
|
| 177 |
+
- **Hardware Type:** [More Information Needed]
|
| 178 |
+
- **Hours used:** [More Information Needed]
|
| 179 |
+
- **Cloud Provider:** [More Information Needed]
|
| 180 |
+
- **Compute Region:** [More Information Needed]
|
| 181 |
+
- **Carbon Emitted:** [More Information Needed]
|
| 182 |
+
|
| 183 |
+
# Technical Specifications [optional]
|
| 184 |
+
|
| 185 |
+
## Model Architecture and Objective
|
| 186 |
+
|
| 187 |
+
The SpeechT5 framework consists of a shared encoder-decoder network and six modal-specific (speech/text) pre/post-nets.
|
| 188 |
+
|
| 189 |
+
After preprocessing the input speech/text through the pre-nets, the shared encoder-decoder network models the sequence-to-sequence transformation, and then the post-nets generate the output in the speech/text modality based on the output of the decoder.
|
| 190 |
+
|
| 191 |
+
## Compute Infrastructure
|
| 192 |
+
|
| 193 |
+
[More Information Needed]
|
| 194 |
+
|
| 195 |
+
### Hardware
|
| 196 |
+
|
| 197 |
+
[More Information Needed]
|
| 198 |
+
|
| 199 |
+
### Software
|
| 200 |
+
|
| 201 |
+
[More Information Needed]
|
| 202 |
+
|
| 203 |
+
# Citation [optional]
|
| 204 |
+
|
| 205 |
+
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 206 |
|
| 207 |
**BibTeX:**
|
| 208 |
|
|
|
|
| 216 |
pages={5723--5738},
|
| 217 |
}
|
| 218 |
```
|
| 219 |
+
|
| 220 |
+
# Glossary [optional]
|
| 221 |
+
|
| 222 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 223 |
+
|
| 224 |
+
- **text-to-speech** to synthesize audio
|
| 225 |
+
|
| 226 |
+
# More Information [optional]
|
| 227 |
+
|
| 228 |
+
[More Information Needed]
|
| 229 |
+
|
| 230 |
+
# Model Card Authors [optional]
|
| 231 |
+
|
| 232 |
+
Disclaimer: The team releasing SpeechT5 did not write a model card for this model so this model card has been written by the Hugging Face team.
|
| 233 |
+
|
| 234 |
+
# Model Card Contact
|
| 235 |
+
|
| 236 |
+
[More Information Needed]
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
|