Skip to main content

A permissively-licensed European Portuguese (pt-PT) text-to-speech voice, fine-tuned from Kokoro-82M.

Reason this release was yanked:

0.1.1 resolves a bug with acronyms reading

Project description

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 acoustic KModel is used; the upstream pipeline's GPL-dependent G2P is not.

Licensing

Apache-2.0.

Status

Early release: the runtime + SDK + examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tts_eu_pt-0.1.0.tar.gz (46.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tts_eu_pt-0.1.0-py3-none-any.whl (48.8 kB view details)

Uploaded Python 3

File details

Details for the file tts_eu_pt-0.1.0.tar.gz.

File metadata

  • Download URL: tts_eu_pt-0.1.0.tar.gz
  • Upload date:
  • Size: 46.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for tts_eu_pt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e4b2ae1266151c34445f57ef76397b2f9165fac48c90603b46313e91c0f41cc4
MD5 89d65d065c4b69343cc686c8605f04a3
BLAKE2b-256 780f9e2ed00c01a938e9d755e694ea1fd4e6201147740f629cf03d814692e6a4

See more details on using hashes here.

File details

Details for the file tts_eu_pt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tts_eu_pt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 48.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for tts_eu_pt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd0357cc2829ce9d12644acccea20effe98fec2016e2fe7ea9f5f3dba60cc610
MD5 9501da70e921ef653889cec4ee12aac5
BLAKE2b-256 751ff82e4affb796d50791e47384d93f08d84bcc8adf518aec4e5f3aa1ef2cfe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page