Blue / README.md
notmax123's picture
Document Space URL, upstream duplicate, link notmax123/blue
89b06e5 verified
---
title: BlueTTS - Multilingual TTS
emoji: 🔊
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 6.9.0
app_file: app.py
pinned: false
python_version: "3.12"
---
# BlueTTS — Multilingual text-to-speech
**This Space:** [https://huggingface.co/spaces/notmax123/Blue](https://huggingface.co/spaces/notmax123/Blue)
Interactive demo for **[BlueTTS](https://github.com/maxmelichov/BlueTTS)**: fast on-device synthesis with **ONNX Runtime**. Type text, pick a language and voice, and generate audio in the browser. Project site: [lightbluetts.com](https://lightbluetts.com/).
This Space was duplicated from [thewh1teagle/lightblue-tts-hebrew](https://huggingface.co/spaces/thewh1teagle/lightblue-tts-hebrew) and adapted for the current BlueTTS ONNX bundle.
## Languages
- **English, Spanish, German, Italian** — phonemization with **espeak-ng** (via phonemizer), aligned with the multilingual tokenizer in the app.
- **Hebrew** — grapheme-to-phoneme via [Renikud](https://huggingface.co/thewh1teagle/renikud) (ONNX).
## Voices
Two built-in speaker styles (pre-extracted style JSON):
| Voice | File |
| ------ | ----------------------- |
| Female | `voices/female1.json` |
| Male | `voices/male1.json` |
## Implementation note
This Space runs **inference from `app.py`** (vocabulary, phonemization, ONNX sessions). It does **not** install the upstream [`blue`](https://github.com/maxmelichov/BlueTTS) Python package from GitHub (that package name replaced the old `lightblue-onnx` wheel and would conflict with pip’s expected name in a flat `requirements.txt`).
## Model weights
ONNX checkpoints are **not** stored in this Space repo (file-size limits). On first startup, `download_models.py` fetches them from the public model repo **[notmax123/blue-onnx](https://huggingface.co/notmax123/blue-onnx)** into `./onnx_models/`.
**Training / finetuning / voice-export weights** (PyTorch / Safetensors): **[notmax123/blue](https://huggingface.co/notmax123/blue)**.
If you fork this Space and point downloads at a **private** repo, set a Hugging Face **write** token as the Space secret `HF_TOKEN` so authenticated downloads still work.
## Links
- **This demo (Space):** [huggingface.co/spaces/notmax123/Blue](https://huggingface.co/spaces/notmax123/Blue)
- **ONNX weights:** [notmax123/blue-onnx](https://huggingface.co/notmax123/blue-onnx)
- **PyTorch / training weights:** [notmax123/blue](https://huggingface.co/notmax123/blue)
- **Source code:** [maxmelichov/BlueTTS on GitHub](https://github.com/maxmelichov/BlueTTS)
- **Hebrew G2P:** [thewh1teagle/renikud](https://huggingface.co/thewh1teagle/renikud)
## Local development
Dependencies are listed in `requirements.txt`. With Python 3.12:
```bash
pip install -r requirements.txt
python download_models.py # once, to populate onnx_models/
python app.py # or: gradio will launch from app_file when run by HF
```
To refresh `requirements.txt` from **uv**:
```bash
uv export --no-hashes --no-emit-project > requirements.txt
```
## License
See the [BlueTTS](https://github.com/maxmelichov/BlueTTS) repository and the [blue-onnx](https://huggingface.co/notmax123/blue-onnx) model card for licensing of code and weights.