tiny-voca-pt-pt / README.md
joserui's picture
Ligação à demonstração no navegador
9d54782 verified
|
Raw History Blame Contribute Delete
4.35 kB
metadata
license: apache-2.0
language:
  - pt
pipeline_tag: text-to-speech
datasets:
  - joserui/tiny-voca-pt-pt-data
tags:
  - text-to-speech
  - portuguese
  - european-portuguese
  - pt-pt

tiny-voca PT-PT

A small European Portuguese text-to-speech model with two invented voices, F3 (female) and M1 (male). The complete model, waveform generator included, has 4.5M parameters (4,532,875) and was trained from scratch on 22.8 hours of synthetic Portuguese speech, with the architecture and recipe of tiny-voca by Muhammed Nazeem. It runs about 150 times faster than real time on four CPU threads (Apple M4 Pro).

Um modelo pequeno de texto para voz em português europeu, com duas vozes inventadas. Leia-me em português no GitHub.

Voice Sample
F3
M1

«Bom dia. Hoje vamos ao jardim ver as roseiras e podar as macieiras, antes que chegue o Inverno.» More samples in samples/ (numbers, a question, a long sentence; texts in samples/textos.txt).

Parameters 4,532,875
Voices F3, M1 (European Portuguese, Lisbon)
Output 24 kHz mono
Input Text, converted to phonemes with pronuncia-pt 0.2.0 (in the code repository)
Pretrained weights in the model None
Licence Apache-2.0

Files

File Size Contents
tiny-voca-pt-pt.pt 18.2 MB PyTorch weights, float32, step 120,000
onnx/model.onnx 21.4 MB ONNX export for ONNX Runtime (the browser demo uses it)
config.json Model settings
samples/ Eight samples, four sentences in each voice

Use

git clone https://github.com/joseruimemory/tiny-voca-pt-pt.git && cd tiny-voca-pt-pt
pip install -e . -e ./pronuncia-pt
hf download joserui/tiny-voca-pt-pt --local-dir weights
TINY_VOCA_FRONTEND=pt python -m tiny_voca.infer --checkpoint weights/tiny-voca-pt-pt.pt \
  --voice M1 --text "Olá! Isto é o tiny-voca em português europeu." --output ola.wav

Training data

  • Text: 13,582 sentences from Common Voice Portuguese (CC0), keeping those a speaker from Portugal would say (Brazilian forms filtered out), five to twenty words each.
  • Voices: F3 and M1 were designed from text descriptions with Qwen3-TTS VoiceDesign (Apache-2.0). They are not the voice of any real person.
  • Speech: each sentence spoken by both voices with Sopro (samuel-vitorino/sopro-v2-turbo, Apache-2.0), cloning from the designed voices, which gives them the Portuguese accent. 27,163 clips, 22.8 hours. One clip was rejected.
  • Split by sentence: 26,643 train, 236 validation, 284 test.

Training

One Mac mini M4 Pro, 64 GB, PyTorch MPS.

Stage Steps Time
v1, from scratch; adversarial training from step 8,000 104,000 52.6 h
v2, fine-tuned after the stressed e/o of 514 words were measured as open or closed in the audio +16,000 8.1 h
Total 120,000 60.7 h

Validation at step 120,000: pitch error 1.03 semitones, voicing accuracy 95.5 %, pause accuracy 92.0 %.

Limitations

The speech it learned from is synthetic, so it has Sopro's accent and some of its mistakes. Pronunciation comes from rules: unusual words, foreign names and abbreviations can come out wrong. Two voices only; no voice cloning.

Please do not use it to pass as a real person.

Credits

tiny-voca by Muhammed Nazeem; Sopro by Samuel Vitorino; Qwen3-TTS by the Qwen team; Common Voice by Mozilla; facebook/wav2vec2-lv-60-espeak-cv-ft for alignment during training.

@software{nazeem2026tinyvoca,
  author = {Nazeem, Muhammed},
  title  = {tiny-voca: a 4.5M-parameter two-voice English text-to-speech model},
  year   = {2026},
  url    = {https://huggingface.co/n4ze3m/tiny-voca}
}