Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,10 +1,70 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Parkiet: Dutch Text-to-Speech (TTS)
|
| 2 |
+
|
| 3 |
+

|
| 4 |
+
|
| 5 |
+
Open-weights Dutch TTS based on the [Parakeet](https://jordandarefsky.com/blog/2024/parakeet/) architecture, ported from [Dia](https://github.com/nari-labs/dia) to JAX for scalable training. A full walkthrough to train the model for your language on Google Cloud TPUs, can be found in the [TRAINING.md](TRAINING.md) doc.
|
| 6 |
+
|
| 7 |
+
**Parkiet creates highly realistic voices from text**. You can guide the audio output to control emotion and tone. The model also supports nonverbal sounds (currently only laughter), and up to four different speakers per prompt. Voice cloning is also supported. Here are some samples.
|
| 8 |
+
|
| 9 |
+
| Text | File |
|
| 10 |
+
|---|---|
|
| 11 |
+
| [S1] denk je dat je een open source model kan trainen met weinig geld en middelen? [S2] ja ik denk het wel. [S1] oh ja, hoe dan? [S2] nou kijk maar in de repo (laughs). | <video src="https://github.com/user-attachments/assets/3fd64933-1434-4a8c-924b-b0c55831df1f">
|
| 12 |
+
| [S1] hoeveel stemmen worden er ondersteund? [S2] nou, uhm, ik denk toch wel meer dan twee. [S3] ja, ja, d dat is het mooie aan dit model. [S4] ja klopt, het ondersteund tot vier verschillende stemmen per prompt. | <video src="https://github.com/user-attachments/assets/6e428840-ca65-4b24-a63d-b6358d08b2f8">
|
| 13 |
+
| [S1] h h et is dus ook mogelijk, om eh ... uhm, heel veel t te st stotteren in een prompt. | <video src="https://github.com/user-attachments/assets/0217d156-3729-4f2d-b6ec-5f7e8ce3f050"> |
|
| 14 |
+
| [S1] je hebt maar weinig audio nodig om een stem te clonen de rest van deze tekst is uitgesproken door een computer. [S2] wauw, dat klinkt wel erg goed. [S1] ja, ik hoop dat je er wat aan hebt. | <video src="https://github.com/user-attachments/assets/f80d6b27-0719-4044-89cc-ae19230505ee">
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
## Generation Guidelines
|
| 20 |
+
|
| 21 |
+
* Use `[S1]`, `[S2]`, `[S3]`, `[S4]` to indicate the different speakers. Always start with `[S1]` and always alternate between [S1] and [S2] (i.e. [S1]... [S1]... is not good).
|
| 22 |
+
* Prefer lower capital text prompts with punctuation. Write out digits as words. Even though the model should be able to handle some variety, it is better to stick close to the output of [WhisperD-NL](https://huggingface.co/pevers/whisperd-nl).
|
| 23 |
+
* Slowing down can be encouraged by using `...` in the prompt.
|
| 24 |
+
* Stuttering and disfluencies can be encouraged by using `eh`, `ehm`, `uh` or `uhm`.
|
| 25 |
+
* Laughter can be added with the `(laughs)` tag. However, use it sparingly because the model quickly derails for too many events.
|
| 26 |
+
|
| 27 |
+
## Quickstart
|
| 28 |
+
|
| 29 |
+
```bash
|
| 30 |
+
uv sync # For CPU
|
| 31 |
+
uv sync --extra tpu # For TPU
|
| 32 |
+
uv sync --extra cuda # For CUDA
|
| 33 |
+
|
| 34 |
+
# Download the checkpoint
|
| 35 |
+
wget https://huggingface.co/pevers/parkiet/blob/main/dia-nl-v1.zip -O weights/dia-nl-v1.zip
|
| 36 |
+
|
| 37 |
+
# Create the checkpoint folder and unzip
|
| 38 |
+
mkdir -p weights
|
| 39 |
+
unzip weights/dia-nl-v1.zip -d weights
|
| 40 |
+
|
| 41 |
+
# Run the inference demo
|
| 42 |
+
# NOTE: Inference can take a while because of JAX compilation. Subsequent calls will be cached and much faster. I'm working on some performance improvements.
|
| 43 |
+
uv run python src/parkiet/jax/inference.py
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
Notes:
|
| 47 |
+
- We use the JAX model by default. The model is also ported back to PyTorch. However, I suspect that due to small differences in the attention kernel between PyTorch and JAX, the PyTorch model hallucinates more and generates strange artifacts more than the JAX model. You can download the PyTorch model from [HuggingFace](https://huggingface.co/pevers/parkiet/blob/main/dia-nl-v1.pth) and use it in the [Dia](https://github.com/nari-labs/dia) pipeline.
|
| 48 |
+
|
| 49 |
+
## ⚠️ Disclaimer
|
| 50 |
+
This project offers a high-fidelity speech generation model intended for research and educational use. The following uses are strictly forbidden:
|
| 51 |
+
|
| 52 |
+
* Identity Misuse: Do not produce audio resembling real individuals without permission.
|
| 53 |
+
* Deceptive Content: Do not use this model to generate misleading content (e.g. fake news).
|
| 54 |
+
* Illegal or Malicious Use: Do not use this model for activities that are illegal or intended to cause harm.
|
| 55 |
+
By using this model, you agree to uphold relevant legal standards and ethical responsibilities. We are not responsible for any misuse and firmly oppose any unethical usage of this technology.
|
| 56 |
+
|
| 57 |
+
## Training
|
| 58 |
+
|
| 59 |
+
For a full guide on data preparation, model conversion and the TPU setup to train this model for any language, see [TRAINING.md](https://github.com/pevers/parkiet/blob/main/TRAINING.md).
|
| 60 |
+
|
| 61 |
+
## Acknowledgements
|
| 62 |
+
|
| 63 |
+
* Darefsky for the excellent blog post on [Parakeet](https://jordandarefsky.com/blog/2024/parakeet/).
|
| 64 |
+
* [Dia](https://github.com/nari-labs/) for open-sourcing the PyTorch model.
|
| 65 |
+
* [Bas Büller](http://github.com/basbuller) for the endless discussions until it finally worked 🙌.
|
| 66 |
+
* [Google Cloud TPU Research Cloud Program](https://sites.research.google/trc/about/) for providing the computation resources.
|
| 67 |
+
|
| 68 |
+
## License
|
| 69 |
+
|
| 70 |
+
Repository code is licensed under the [MIT License](LICENSE). The TTS model itself is licensed as [RAIL-M](MODEL_LICENSE).
|