Update README.md
Browse files
README.md
CHANGED
@@ -3,10 +3,6 @@ library_name: transformers
|
|
3 |
tags: []
|
4 |
---
|
5 |
|
6 |
-
# Model Card for Model ID
|
7 |
-
|
8 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
-
|
10 |
{
|
11 |
"2450": "Mark",
|
12 |
"496": "Jessica",
|
@@ -26,192 +22,143 @@ tags: []
|
|
26 |
"4174": "Michelle"
|
27 |
}
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
### Model Description
|
33 |
-
|
34 |
-
<!-- Provide a longer summary of what this model is. -->
|
35 |
-
|
36 |
-
This is the model card of a π€ transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
37 |
-
|
38 |
-
- **Developed by:** [More Information Needed]
|
39 |
-
- **Funded by [optional]:** [More Information Needed]
|
40 |
-
- **Shared by [optional]:** [More Information Needed]
|
41 |
-
- **Model type:** [More Information Needed]
|
42 |
-
- **Language(s) (NLP):** [More Information Needed]
|
43 |
-
- **License:** [More Information Needed]
|
44 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
45 |
-
|
46 |
-
### Model Sources [optional]
|
47 |
-
|
48 |
-
<!-- Provide the basic links for the model. -->
|
49 |
-
|
50 |
-
- **Repository:** [More Information Needed]
|
51 |
-
- **Paper [optional]:** [More Information Needed]
|
52 |
-
- **Demo [optional]:** [More Information Needed]
|
53 |
-
|
54 |
-
## Uses
|
55 |
-
|
56 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
57 |
-
|
58 |
-
### Direct Use
|
59 |
-
|
60 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
### Downstream Use [optional]
|
65 |
-
|
66 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
67 |
-
|
68 |
-
[More Information Needed]
|
69 |
-
|
70 |
-
### Out-of-Scope Use
|
71 |
-
|
72 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
73 |
-
|
74 |
-
[More Information Needed]
|
75 |
-
|
76 |
-
## Bias, Risks, and Limitations
|
77 |
-
|
78 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
79 |
-
|
80 |
-
[More Information Needed]
|
81 |
-
|
82 |
-
### Recommendations
|
83 |
-
|
84 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
85 |
-
|
86 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
87 |
-
|
88 |
-
## How to Get Started with the Model
|
89 |
-
|
90 |
-
Use the code below to get started with the model.
|
91 |
-
|
92 |
-
[More Information Needed]
|
93 |
-
|
94 |
-
## Training Details
|
95 |
-
|
96 |
-
### Training Data
|
97 |
-
|
98 |
-
<!-- This should link to a Dataset 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. -->
|
99 |
-
|
100 |
-
[More Information Needed]
|
101 |
-
|
102 |
-
### Training Procedure
|
103 |
-
|
104 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
105 |
-
|
106 |
-
#### Preprocessing [optional]
|
107 |
-
|
108 |
-
[More Information Needed]
|
109 |
-
|
110 |
-
|
111 |
-
#### Training Hyperparameters
|
112 |
-
|
113 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
114 |
-
|
115 |
-
#### Speeds, Sizes, Times [optional]
|
116 |
-
|
117 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
118 |
-
|
119 |
-
[More Information Needed]
|
120 |
-
|
121 |
-
## Evaluation
|
122 |
-
|
123 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
124 |
-
|
125 |
-
### Testing Data, Factors & Metrics
|
126 |
-
|
127 |
-
#### Testing Data
|
128 |
-
|
129 |
-
<!-- This should link to a Dataset Card if possible. -->
|
130 |
-
|
131 |
-
[More Information Needed]
|
132 |
-
|
133 |
-
#### Factors
|
134 |
-
|
135 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
136 |
-
|
137 |
-
[More Information Needed]
|
138 |
-
|
139 |
-
#### Metrics
|
140 |
-
|
141 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
142 |
-
|
143 |
-
[More Information Needed]
|
144 |
-
|
145 |
-
### Results
|
146 |
-
|
147 |
-
[More Information Needed]
|
148 |
|
149 |
-
#### Summary
|
150 |
|
|
|
151 |
|
|
|
|
|
|
|
152 |
|
153 |
-
|
154 |
|
155 |
-
|
|
|
156 |
|
157 |
-
|
158 |
|
159 |
-
|
160 |
|
161 |
-
|
162 |
|
163 |
-
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).
|
164 |
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
|
171 |
-
##
|
172 |
|
173 |
-
|
174 |
|
175 |
-
|
176 |
|
177 |
-
|
178 |
|
179 |
-
|
|
|
|
|
180 |
|
181 |
-
|
182 |
|
183 |
-
[More Information Needed]
|
184 |
|
185 |
-
|
186 |
|
187 |
-
|
|
|
|
|
|
|
|
|
188 |
|
189 |
-
|
190 |
|
191 |
-
|
|
|
|
|
192 |
|
193 |
-
|
|
|
194 |
|
195 |
-
|
|
|
196 |
|
197 |
-
|
|
|
|
|
|
|
198 |
|
199 |
-
|
|
|
|
|
|
|
|
|
200 |
|
201 |
-
##
|
202 |
|
203 |
-
|
204 |
|
205 |
-
|
|
|
|
|
|
|
|
|
206 |
|
207 |
-
##
|
208 |
|
209 |
-
|
210 |
|
211 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
|
213 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
|
215 |
-
##
|
216 |
|
217 |
-
|
|
|
3 |
tags: []
|
4 |
---
|
5 |
|
|
|
|
|
|
|
|
|
6 |
{
|
7 |
"2450": "Mark",
|
8 |
"496": "Jessica",
|
|
|
22 |
"4174": "Michelle"
|
23 |
}
|
24 |
|
25 |
+
---
|
26 |
+
library_name: transformers
|
27 |
+
tags:
|
28 |
+
- text-to-speech
|
29 |
+
- annotation
|
30 |
+
license: apache-2.0
|
31 |
+
language:
|
32 |
+
- en
|
33 |
+
- fr
|
34 |
+
- es
|
35 |
+
- pt
|
36 |
+
- pl
|
37 |
+
- de
|
38 |
+
- nl
|
39 |
+
- it
|
40 |
+
pipeline_tag: text-to-speech
|
41 |
+
inference: false
|
42 |
+
datasets:
|
43 |
+
- facebook/multilingual_librispeech
|
44 |
+
- parler-tts/libritts_r_filtered
|
45 |
+
- parler-tts/libritts-r-filtered-speaker-descriptions
|
46 |
+
- parler-tts/mls_eng
|
47 |
+
- parler-tts/mls-eng-speaker-descriptions
|
48 |
+
- PHBJT/mls-annotated
|
49 |
+
- PHBJT/cml-tts-filtered-annotated
|
50 |
+
- PHBJT/cml-tts-filtered
|
51 |
+
---
|
52 |
|
53 |
+
<img src="https://huggingface.co/datasets/parler-tts/images/resolve/main/thumbnail.png" alt="Parler Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
|
|
55 |
|
56 |
+
# Parler-TTS Mini Multilingual
|
57 |
|
58 |
+
<a target="_blank" href="https://huggingface.co/spaces/PHBJT/multi_parler_tts">
|
59 |
+
<img src="https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-sm.svg" alt="Open in HuggingFace"/>
|
60 |
+
</a>
|
61 |
|
62 |
+
**Parler-TTS Mini Multilingual v1** is a multilingual extension of [Parler-TTS Mini](https://huggingface.co/parler-tts/parler-tts-mini-v1.1).
|
63 |
|
64 |
+
It is a fine-tuned version, trained on a [cleaned version](https://huggingface.co/datasets/PHBJT/cml-tts-filtered) of [CML-TTS](https://huggingface.co/datasets/ylacombe/cml-tts) and on the non-English version of [Multilingual LibriSpeech](https://huggingface.co/datasets/facebook/multilingual_librispeech).
|
65 |
+
In all, this represents some 9,200 hours of non-English data. To retain English capabilities, we also added back the [LibriTTS-R English dataset](https://huggingface.co/datasets/parler-tts/libritts_r_filtered), some 580h of high-quality English data.
|
66 |
|
67 |
+
**Parler-TTS Mini Multilingual** can speak in 8 European languages: English, French, Spanish, Portuguese, Polish, German, Italian and Dutch.
|
68 |
|
69 |
+
Thanks to its **better prompt tokenizer**, it can easily be extended to other languages. This tokenizer has a larger vocabulary and handles byte fallback, which simplifies multilingual training.
|
70 |
|
71 |
+
π¨ This work is the result of a collaboration between the **HuggingFace audio team** and the **[Quantum Squadra](https://quantumsquadra.com/) team**. The **[AI4Bharat](https://ai4bharat.iitm.ac.in/) team** also provided advice and assistance in improving tokenization. π¨
|
72 |
|
|
|
73 |
|
74 |
+
## π Quick Index
|
75 |
+
* [π¨βπ» Installation](#π¨βπ»-installation)
|
76 |
+
* [π― Inference](#inference)
|
77 |
+
* [Motivation](#motivation)
|
78 |
+
* [Optimizing inference](https://github.com/huggingface/parler-tts/blob/main/INFERENCE.md)
|
79 |
|
80 |
+
## π οΈ Usage
|
81 |
|
82 |
+
π¨Unlike previous versions of Parler-TTS, here we use two tokenizers - one for the prompt and one for the description.π¨
|
83 |
|
84 |
+
### π¨βπ» Installation
|
85 |
|
86 |
+
Using Parler-TTS is as simple as "bonjour". Simply install the library once:
|
87 |
|
88 |
+
```sh
|
89 |
+
pip install git+https://github.com/huggingface/parler-tts.git
|
90 |
+
```
|
91 |
|
92 |
+
### Inference
|
93 |
|
|
|
94 |
|
95 |
+
**Parler-TTS** has been trained to generate speech with features that can be controlled with a simple text prompt, for example:
|
96 |
|
97 |
+
```py
|
98 |
+
import torch
|
99 |
+
from parler_tts import ParlerTTSForConditionalGeneration
|
100 |
+
from transformers import AutoTokenizer
|
101 |
+
import soundfile as sf
|
102 |
|
103 |
+
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
104 |
|
105 |
+
model = ParlerTTSForConditionalGeneration.from_pretrained("parler-tts/parler-tts-mini-multilingual").to(device)
|
106 |
+
tokenizer = AutoTokenizer.from_pretrained("parler-tts/parler-tts-mini-multilingual")
|
107 |
+
description_tokenizer = AutoTokenizer.from_pretrained(model.config.text_encoder._name_or_path)
|
108 |
|
109 |
+
prompt = "Hey, how are you doing today?"
|
110 |
+
description = "A female speaker delivers a slightly expressive and animated speech with a moderate speed and pitch. The recording is of very high quality, with the speaker's voice sounding clear and very close up."
|
111 |
|
112 |
+
input_ids = description_tokenizer(description, return_tensors="pt").input_ids.to(device)
|
113 |
+
prompt_input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)
|
114 |
|
115 |
+
generation = model.generate(input_ids=input_ids, prompt_input_ids=prompt_input_ids)
|
116 |
+
audio_arr = generation.cpu().numpy().squeeze()
|
117 |
+
sf.write("parler_tts_out.wav", audio_arr, model.config.sampling_rate)
|
118 |
+
```
|
119 |
|
120 |
+
**Tips**:
|
121 |
+
* We've set up an [inference guide](https://github.com/huggingface/parler-tts/blob/main/INFERENCE.md) to make generation faster. Think SDPA, torch.compile, batching and streaming!
|
122 |
+
* Include the term "very clear audio" to generate the highest quality audio, and "very noisy audio" for high levels of background noise
|
123 |
+
* Punctuation can be used to control the prosody of the generations, e.g. use commas to add small breaks in speech
|
124 |
+
* The remaining speech features (gender, speaking rate, pitch and reverberation) can be controlled directly through the prompt
|
125 |
|
126 |
+
## Motivation
|
127 |
|
128 |
+
Parler-TTS is a reproduction of work from the paper [Natural language guidance of high-fidelity text-to-speech with synthetic annotations](https://www.text-description-to-speech.com) by Dan Lyth and Simon King, from Stability AI and Edinburgh University respectively.
|
129 |
|
130 |
+
Contrarily to other TTS models, Parler-TTS is a **fully open-source** release. All of the datasets, pre-processing, training code and weights are released publicly under permissive license, enabling the community to build on our work and develop their own powerful TTS models.
|
131 |
+
Parler-TTS was released alongside:
|
132 |
+
* [The Parler-TTS repository](https://github.com/huggingface/parler-tts) - you can train and fine-tuned your own version of the model.
|
133 |
+
* [The Data-Speech repository](https://github.com/huggingface/dataspeech) - a suite of utility scripts designed to annotate speech datasets.
|
134 |
+
* [The Parler-TTS organization](https://huggingface.co/parler-tts) - where you can find the annotated datasets as well as the future checkpoints.
|
135 |
|
136 |
+
## Citation
|
137 |
|
138 |
+
If you found this repository useful, please consider citing this work and also the original Stability AI paper:
|
139 |
|
140 |
+
```
|
141 |
+
@misc{lacombe-etal-2024-parler-tts,
|
142 |
+
author = {Yoach Lacombe and Vaibhav Srivastav and Sanchit Gandhi},
|
143 |
+
title = {Parler-TTS},
|
144 |
+
year = {2024},
|
145 |
+
publisher = {GitHub},
|
146 |
+
journal = {GitHub repository},
|
147 |
+
howpublished = {\url{https://github.com/huggingface/parler-tts}}
|
148 |
+
}
|
149 |
+
```
|
150 |
|
151 |
+
```
|
152 |
+
@misc{lyth2024natural,
|
153 |
+
title={Natural language guidance of high-fidelity text-to-speech with synthetic annotations},
|
154 |
+
author={Dan Lyth and Simon King},
|
155 |
+
year={2024},
|
156 |
+
eprint={2402.01912},
|
157 |
+
archivePrefix={arXiv},
|
158 |
+
primaryClass={cs.SD}
|
159 |
+
}
|
160 |
+
```
|
161 |
|
162 |
+
## License
|
163 |
|
164 |
+
This model is permissively licensed under the Apache 2.0 license.
|