|
Download README.md from apptor/apptor-tiny-tts: direct link, hf CLI and curl.
- Browser
- Download file 4.43 kB
-
https://huggingface.co/apptor/apptor-tiny-tts/resolve/main/README.md
- Command line
-
hf download hf://apptor/apptor-tiny-tts/README.md
-
curl -L -o README.md https://huggingface.co/apptor/apptor-tiny-tts/resolve/main/README.md
4.43 kB
| license: apache-2.0 | |
| language: | |
| - de | |
| pipeline_tag: text-to-speech | |
| library_name: onnx | |
| tags: | |
| - tts | |
| - text-to-speech | |
| - german | |
| - onnx | |
| - cpu | |
| - tiny-voca | |
| - vocos | |
| # apptor-tiny-tts (German) | |
| A tiny German text-to-speech model that runs on the CPU: **4.5M parameters, one 21 MB ONNX file**, about 40x faster | |
| than real time on four CPU threads. Two voices: `F2` (female) and `M2` (male), 24 kHz. | |
| It is built on **[tiny-voca](https://github.com/n4ze3m/tiny-voca) by n4ze3m**: same architecture and training | |
| recipe, retrained from scratch for German. This is **not an official tiny-voca release**. Thanks to n4ze3m for the | |
| model and the idea. | |
| An optional second stage, a [Vocos](https://github.com/gemelo-ai/vocos) vocoder fine-tuned on the two voices | |
| (13.5M parameters, 54 MB), re-synthesises the waveform and removes most of the buzzy sound of the tiny built-in | |
| generator. It is still real time on the CPU (~20x). | |
| Listen: `samples/demo.wav` (with Vocos) and `samples/demo-without-vocos.wav`. | |
| ## Files | |
| | file | what | license | | |
| |---|---|---| | |
| | `apptor-tiny-tts-de.onnx` | the TTS model (text tokens -> 24 kHz audio) | Apache-2.0 | | |
| | `apptor-tiny-tts-de.json` | sample rate, voices, phoneme symbols, limits | Apache-2.0 | | |
| | `apptor-tiny-tts-vocos-de.pt` | optional: Vocos state dict, fine-tuned from `charactr/vocos-mel-24khz` | MIT | | |
| | `tinyvoca/` | German text front end (eSpeak NG phonemes, number normalisation), from tiny-voca | Apache-2.0 | | |
| | `speak.py` | minimal example | Apache-2.0 | | |
| ## Use | |
| Needs the `espeak-ng` program (`apt install espeak-ng`; GPL-3.0, called as a separate process) and | |
| `pip install onnxruntime numpy soundfile num2words`. | |
| ```bash | |
| python speak.py "Am 3. Mai um 18:30 Uhr kostet das Ticket 12,50 Euro." --voice M2 --out test.wav | |
| # with the Vocos second stage (pip install torch vocos): | |
| python speak.py "Hallo, wie geht es dir?" --voice F2 --vocos --out test.wav | |
| ``` | |
| ONNX inputs: `tokens` and `stress` (int64 [1, N], from `tinyvoca.text.phonemize`), `voice` (int64 [1], index into | |
| `voices`), `speed`, `pitch_shift`, `pitch_range` (float32 [1]; 1.0 / 0.0 / 1.0 for normal). Outputs: `audio` | |
| (float32 [1, samples]) and `durations`. At most 512 phoneme tokens per call; split longer text into sentences. | |
| It is also a voice of [flash-voice](https://github.com/ViktorsGitUser/flash-voice) (`services/tinytts_server.py`, | |
| same HTTP API as the other voices there), as an Apache-2.0 alternative to the German Phonon model, which is | |
| CC BY-NC 4.0 (non-commercial only). | |
| ## Training | |
| - **Data:** about 12 hours of synthetic German speech, ~15,000 utterances, made with | |
| [Qwen3-TTS](https://github.com/QwenLM/Qwen3-TTS) 1.7B Base (Apache-2.0) with two of its built-in voices. Texts: | |
| Mozilla Common Voice German sentences (CC0). Utterances were screened with Whisper. | |
| - **Front end:** eSpeak NG `de`, 67 phoneme symbols (the English inventory of tiny-voca replaced by a German one), | |
| German number/date/time normalisation. | |
| - **Model:** tiny-voca recipe, 82k steps on one RTX 3090 (about 10 hours). | |
| - **Vocoder:** Vocos fine-tuned for about 60k steps on an RTX 5060 Ti: input is tiny-voca's own teacher-forced | |
| waveform, target the recording. | |
| - Data, training and tuning took about 12.5 hours on one Sunday. | |
| **Evaluation** (Whisper large-v3-turbo, word error rate): 5.0% on 16 unseen sentences (F2 4.6%, M2 5.5%). | |
| ## Limitations | |
| - German only. English words are read with German pronunciation. | |
| - The sound is clear but not studio quality; without Vocos it is noticeably buzzy. | |
| - A word-final long "a" before a comma is sometimes drawn out ("Anna, ..."). | |
| - The voices are synthetic (Qwen3-TTS built-in voices), not clones of real people. | |
| ## Deutsch | |
| Ein winziges deutsches TTS-Modell für die CPU (4,5M Parameter, 21 MB ONNX), auf Basis von tiny-voca von n4ze3m | |
| nachtrainiert, mit optionalem Vocos-Vocoder. Gewichte und Code unter Apache 2.0, also auch kommerziell nutzbar, | |
| der Vocoder unter MIT. Keine offizielle tiny-voca-Version. | |
| ## Credits | |
| - [tiny-voca](https://github.com/n4ze3m/tiny-voca) by n4ze3m: architecture, training recipe, text front end (Apache-2.0) | |
| - [Vocos](https://github.com/gemelo-ai/vocos), `charactr/vocos-mel-24khz` (MIT) | |
| - [Qwen3-TTS](https://github.com/QwenLM/Qwen3-TTS) (Apache-2.0): training speech | |
| - [Mozilla Common Voice](https://commonvoice.mozilla.org) German (CC0): texts | |
| - [eSpeak NG](https://github.com/espeak-ng/espeak-ng) (GPL-3.0, not included), num2words (LGPL-2.1) | |