tts_eu_pt - an European Portuguese text-to-speech based on Kokoro TTS
A small, permissively-licensed (Apache-2.0) European Portuguese (pt-PT) voice, fine-tuned from Kokoro-82M. It runs on CPU, ships as a tiny Python package.
Why it's different
The hard part of pt-PT TTS isn't the acoustics — it's reading text the way a Portuguese
speaker actually does. tts_eu_pt handles, out of the box:
| Input | Spoken as |
|---|---|
25, 125, 1139 |
vinte cinco, cento e vinte cinco, mil cento e trinta e nove |
16:54, 16:00 |
dezasseis e cinquenta e quatro, dezasseis horas |
1139-1185 |
mil cento e trinta e nove a mil cento e oitenta e cinco |
D. Afonso I |
Dom Afonso Primeiro |
IA, LLM, UTC |
i-á, éle-éle-éme, u-tê-cê |
online, software |
kept in their English pronunciation (as Portuguese speakers say them) |
The G2P (Grapheme-to-Phoneme) is built on the Apache-2.0 TugaPhone front-end (Lisbon lect).
Install
pip install tts_eu_pt
Quick start
from tts_eu_pt import TTS
tts = TTS() # downloads the voice on first run
wav = tts.say("Olá! São dezasseis horas.") # numpy float32 @ 24 kHz
tts.save("ola.wav", "Bem-vindo ao tts_eu_pt.")
Command line:
tts-eu-pt "D. Afonso I reinou de 1139 a 1185." reis.wav
tts-eu-pt --text "Bom dia." --speed 1.1 ola.wav # or python -m tts_eu_pt.cli
The voice (~313 MB) downloads once from
logus2k/kokoro_tts_eu_pt and is cached
by huggingface_hub. To run offline or from a different copy, pass
TTS(model_path=..., voicepack_path=...) or set TTS_EU_PT_REPO.
Web echo demo
A one-page demo: type a sentence, press Enter, the page speaks it back in European Portuguese.
pip install "tts_eu_pt[server]"
python -m tts_eu_pt.server # open http://localhost:8000
A static page (tts_eu_pt/web/) plus a ~50-line FastAPI backend
(tts_eu_pt/server.py) — browsers can't run the torch model
directly. To run it against local weights, set TTS_EU_PT_MODEL and
TTS_EU_PT_VOICEPACK; PORT overrides the default 8000.
How it works
- Weights encode the language (pt-PT phonology/accent); a small voicepack encodes the speaker. They are separate files.
- Text →
tts_eu_pt.g2p(normalisation + TugaPhone) → phoneme ids → Kokoro acoustic model → 24 kHz audio. - The Kokoro acoustic model is vendored (
tts_eu_pt/kokoro/, Apache-2.0). Only the acousticKModelis used; the upstream pipeline's GPL-dependent G2P is not.
Licensing
Apache-2.0.
Status
Early release: the runtime + SDK + examples.
Metadata
Release files for tts-eu-pt 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tts_eu_pt-0.1.1.tar.gz | 47.6 kB | Without provenance | Details for tts_eu_pt-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tts_eu_pt-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for tts_eu_pt-0.1.1-py3-none-any.whl |
Total release size: 96.7 kB
Release files / tts_eu_pt-0.1.1.tar.gz
| Download URL | tts_eu_pt-0.1.1.tar.gz |
|---|---|
| Size | 47.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dcc0ecb2de3f6b18e683e2004e7ed2b0313b4bfbbd2dfe821f3ddc66bc3213d3
|
|
BLAKE2b-256 checksum How to use checksums |
423bcd7b81bd44af8a769bc5c275a67a4d8e76724137dab0fb9afa0c17022eb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / tts_eu_pt-0.1.1-py3-none-any.whl
| Download URL | tts_eu_pt-0.1.1-py3-none-any.whl |
|---|---|
| Size | 49.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
38c32722134d3072f32681f2fd3a638305124e6ed4350f06dcc7262ed30c6d84
|
|
BLAKE2b-256 checksum How to use checksums |
58d3971d05225f07b1f377a3f979e89959007152dc23ca2868ef92681a09eb0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for tts-eu-pt 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.