Update README.md
Browse files
README.md
CHANGED
|
@@ -8,204 +8,92 @@ base_model:
|
|
| 8 |
pipeline_tag: text-to-speech
|
| 9 |
---
|
| 10 |
|
| 11 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
<img src="https://huggingface.co/datasets/Adia-tts/images/resolve/main/thumbnail.png" alt="Parler Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
# Adia-TTS
|
| 17 |
-
|
| 18 |
-
<a target="_blank" href="https://huggingface.co/spaces/parler-tts/parler_tts">
|
| 19 |
-
<img src="https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-sm.svg" alt="Open in HuggingFace"/>
|
| 20 |
-
</a>
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
## Model Details
|
| 25 |
-
|
| 26 |
-
### Model Description
|
| 27 |
-
|
| 28 |
-
<!-- Provide a longer summary of what this model is. -->
|
| 29 |
-
|
| 30 |
-
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 31 |
-
|
| 32 |
-
- **Developed by:** [More Information Needed]
|
| 33 |
-
- **Funded by [optional]:** [More Information Needed]
|
| 34 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 35 |
-
- **Model type:** [More Information Needed]
|
| 36 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 37 |
-
- **License:** [More Information Needed]
|
| 38 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 39 |
-
|
| 40 |
-
### Model Sources [optional]
|
| 41 |
-
|
| 42 |
-
<!-- Provide the basic links for the model. -->
|
| 43 |
-
|
| 44 |
-
- **Repository:** [More Information Needed]
|
| 45 |
-
- **Paper [optional]:** [More Information Needed]
|
| 46 |
-
- **Demo [optional]:** [More Information Needed]
|
| 47 |
-
|
| 48 |
-
## Uses
|
| 49 |
-
|
| 50 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 51 |
-
|
| 52 |
-
### Direct Use
|
| 53 |
-
|
| 54 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 55 |
-
|
| 56 |
-
[More Information Needed]
|
| 57 |
-
|
| 58 |
-
### Downstream Use [optional]
|
| 59 |
-
|
| 60 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
| 61 |
-
|
| 62 |
-
[More Information Needed]
|
| 63 |
-
|
| 64 |
-
### Out-of-Scope Use
|
| 65 |
-
|
| 66 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 67 |
-
|
| 68 |
-
[More Information Needed]
|
| 69 |
-
|
| 70 |
-
## Bias, Risks, and Limitations
|
| 71 |
-
|
| 72 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 73 |
-
|
| 74 |
-
[More Information Needed]
|
| 75 |
-
|
| 76 |
-
### Recommendations
|
| 77 |
-
|
| 78 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 79 |
-
|
| 80 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 81 |
-
|
| 82 |
-
## How to Get Started with the Model
|
| 83 |
-
|
| 84 |
-
Use the code below to get started with the model.
|
| 85 |
-
|
| 86 |
-
[More Information Needed]
|
| 87 |
-
|
| 88 |
-
## Training Details
|
| 89 |
-
|
| 90 |
-
### Training Data
|
| 91 |
-
|
| 92 |
-
<!-- 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. -->
|
| 93 |
-
|
| 94 |
-
[More Information Needed]
|
| 95 |
-
|
| 96 |
-
### Training Procedure
|
| 97 |
-
|
| 98 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 99 |
-
|
| 100 |
-
#### Preprocessing [optional]
|
| 101 |
-
|
| 102 |
-
[More Information Needed]
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
#### Training Hyperparameters
|
| 106 |
-
|
| 107 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 108 |
-
|
| 109 |
-
#### Speeds, Sizes, Times [optional]
|
| 110 |
-
|
| 111 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 112 |
-
|
| 113 |
-
[More Information Needed]
|
| 114 |
-
|
| 115 |
-
## Evaluation
|
| 116 |
-
|
| 117 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 118 |
-
|
| 119 |
-
### Testing Data, Factors & Metrics
|
| 120 |
-
|
| 121 |
-
#### Testing Data
|
| 122 |
-
|
| 123 |
-
<!-- This should link to a Dataset Card if possible. -->
|
| 124 |
-
|
| 125 |
-
[More Information Needed]
|
| 126 |
-
|
| 127 |
-
#### Factors
|
| 128 |
-
|
| 129 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 130 |
-
|
| 131 |
-
[More Information Needed]
|
| 132 |
-
|
| 133 |
-
#### Metrics
|
| 134 |
-
|
| 135 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 136 |
-
|
| 137 |
-
[More Information Needed]
|
| 138 |
-
|
| 139 |
-
### Results
|
| 140 |
-
|
| 141 |
-
[More Information Needed]
|
| 142 |
-
|
| 143 |
-
#### Summary
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
## Model Examination [optional]
|
| 148 |
-
|
| 149 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 150 |
-
|
| 151 |
-
[More Information Needed]
|
| 152 |
-
|
| 153 |
-
## Environmental Impact
|
| 154 |
-
|
| 155 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 156 |
-
|
| 157 |
-
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).
|
| 158 |
-
|
| 159 |
-
- **Hardware Type:** [More Information Needed]
|
| 160 |
-
- **Hours used:** [More Information Needed]
|
| 161 |
-
- **Cloud Provider:** [More Information Needed]
|
| 162 |
-
- **Compute Region:** [More Information Needed]
|
| 163 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 164 |
-
|
| 165 |
-
## Technical Specifications [optional]
|
| 166 |
-
|
| 167 |
-
### Model Architecture and Objective
|
| 168 |
-
|
| 169 |
-
[More Information Needed]
|
| 170 |
-
|
| 171 |
-
### Compute Infrastructure
|
| 172 |
-
|
| 173 |
-
[More Information Needed]
|
| 174 |
-
|
| 175 |
-
#### Hardware
|
| 176 |
-
|
| 177 |
-
[More Information Needed]
|
| 178 |
-
|
| 179 |
-
#### Software
|
| 180 |
-
|
| 181 |
-
[More Information Needed]
|
| 182 |
-
|
| 183 |
-
## Citation [optional]
|
| 184 |
-
|
| 185 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 186 |
-
|
| 187 |
-
**BibTeX:**
|
| 188 |
-
|
| 189 |
-
[More Information Needed]
|
| 190 |
-
|
| 191 |
-
**APA:**
|
| 192 |
-
|
| 193 |
-
[More Information Needed]
|
| 194 |
-
|
| 195 |
-
## Glossary [optional]
|
| 196 |
-
|
| 197 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 198 |
-
|
| 199 |
-
[More Information Needed]
|
| 200 |
-
|
| 201 |
-
## More Information [optional]
|
| 202 |
-
|
| 203 |
-
[More Information Needed]
|
| 204 |
-
|
| 205 |
-
## Model Card Authors [optional]
|
| 206 |
-
|
| 207 |
-
[More Information Needed]
|
| 208 |
-
|
| 209 |
-
## Model Card Contact
|
| 210 |
-
|
| 211 |
-
[More Information Needed]
|
|
|
|
| 8 |
pipeline_tag: text-to-speech
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Documentation de Adia_TTS
|
| 12 |
+
|
| 13 |
+
## Introduction
|
| 14 |
+
Adia_TTS est une extension monolocuteur wolof du modèle `parler-tts-mini-multilingual-v1.1`. Il a été entraîné sur un ensemble de données de 40 heures en wolof et affiné pendant 100 epochs, soit environ 168 heures d'entraînement.
|
| 15 |
+
|
| 16 |
+
Le modèle génère une voix plus naturelle et fluide, comparable à celle d'un humain.
|
| 17 |
+
|
| 18 |
+
## Installation
|
| 19 |
+
L'utilisation d'Adia_TTS est simple. Tout d'abord, installez la bibliothèque `Parler-TTS` en exécutant la commande suivante :
|
| 20 |
+
```sh
|
| 21 |
+
pip install git+https://github.com/huggingface/parler-tts.git
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
+
## Utilisation
|
| 25 |
+
Adia_TTS suit les mêmes interfaces que les versions précédentes de `Parler-TTS`. La qualité de la voix peut être ajustée en modifiant la description fournie au modèle, en précisant des critères comme : voix claire, monotone, sans bruit de fond, etc.
|
| 26 |
+
|
| 27 |
+
### Exemple d'utilisation
|
| 28 |
+
Le code suivant montre comment utiliser Adia_TTS pour générer un fichier audio :
|
| 29 |
+
|
| 30 |
+
```py
|
| 31 |
+
import torch
|
| 32 |
+
from parler_tts import ParlerTTSForConditionalGeneration
|
| 33 |
+
from transformers import AutoTokenizer
|
| 34 |
+
from IPython.display import Audio
|
| 35 |
+
import soundfile as sf
|
| 36 |
+
|
| 37 |
+
# Détection de l'appareil disponible
|
| 38 |
+
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
| 39 |
+
|
| 40 |
+
# Chargement du modèle et du tokenizer
|
| 41 |
+
model = ParlerTTSForConditionalGeneration.from_pretrained("Moustapha91/parler-tts-wolof").to(device)
|
| 42 |
+
tokenizer = AutoTokenizer.from_pretrained("Moustapha91/parler-tts-wolof")
|
| 43 |
+
|
| 44 |
+
# Définition du texte d'entrée (exemple en wolof)
|
| 45 |
+
prompt = """Am na yoon yu bari yoo mëna amee xaalis ngir sa projet: Liggéeyandoo ak: Sàkku jàppale ci yokkute mbay ak transformation produit yi. Defar bu baax sa projet te jokkoo ak ñoom. Banqi yi: Demal ci banq yi ngir ñu may la crédit ngir tambali sa projet"""
|
| 46 |
+
|
| 47 |
+
# Description influençant la qualité de la synthèse vocale
|
| 48 |
+
description = "A crystal clear and distinct voice, with a moderate reading rate that facilitates understanding. The tone is monotonous, without variations or inflections, which provides a uniform listening experience. The voice is free of background noise and allows for continuous reading, without inappropriate pauses, thus ensuring a constant and pleasant flow."
|
| 49 |
+
|
| 50 |
+
# Tokenisation des entrées
|
| 51 |
+
input_ids = tokenizer(description, return_tensors="pt").input_ids.to(device)
|
| 52 |
+
prompt_input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)
|
| 53 |
+
|
| 54 |
+
# Génération de l'audio
|
| 55 |
+
generation = model.generate(
|
| 56 |
+
input_ids=input_ids,
|
| 57 |
+
prompt_input_ids=prompt_input_ids,
|
| 58 |
+
)
|
| 59 |
+
|
| 60 |
+
audio_arr = generation.cpu().numpy().squeeze()
|
| 61 |
+
sf.write("parler_tts_out.wav", audio_arr, model.config.sampling_rate)
|
| 62 |
+
Audio(audio_arr, rate=model.config.sampling_rate)
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
## Ajustement de la Qualité Audio
|
| 66 |
+
La qualité de l'audio peut être modifiée en ajustant la description fournie au modèle. Voici quelques exemples :
|
| 67 |
+
|
| 68 |
+
```py
|
| 69 |
+
description = "Aida speaks slowly with a very clear recording but a monotone voice."
|
| 70 |
+
description = "Adia's speech is very quiet and monotone, delivered with a very small amount of discernible expression."
|
| 71 |
+
description = "Adia's voice comes across as very monotone, speaking slowly with very clear sounds and no background noise."
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
En variant la description, vous pouvez obtenir une sortie vocale différente en termes de clarté, d'expression et de débit.
|
| 75 |
+
|
| 76 |
+
## Références
|
| 77 |
+
```
|
| 78 |
+
@misc{CONCREE-2024-Adia_TTS,
|
| 79 |
+
author = {CONCREE},
|
| 80 |
+
title = {Adia_TTS},
|
| 81 |
+
year = {2024},
|
| 82 |
+
publisher = {Hugging Face},
|
| 83 |
+
journal = {Hugging Face repository},
|
| 84 |
+
howpublished = {\url{https://huggingface.co/CONCREE/Adia_TTS}}
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
@misc{lyth2024natural,
|
| 88 |
+
title={Natural language guidance of high-fidelity text-to-speech with synthetic annotations},
|
| 89 |
+
author={Dan Lyth and Simon King},
|
| 90 |
+
year={2024},
|
| 91 |
+
eprint={2402.01912},
|
| 92 |
+
archivePrefix={arXiv},
|
| 93 |
+
primaryClass={cs.SD}
|
| 94 |
+
}
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
## Licence
|
| 98 |
+
Ce modèle est publié sous la licence permissive Apache 2.0, permettant son utilisation libre et sa modification sous certaines conditions.
|
| 99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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