This release is a pre-release and may not be stable for production use.
text2spoken
text2spoken rewrites written text into the words that a person says when they read it aloud. It reads numbers, dates, times, money, measures, percentages, telephone numbers, colours, abbreviations, and e-mail and web addresses. The rest of the text stays as it is, character for character. It uses no network and no model.
Try it in the browser: text2spoken on Hugging Face, with examples for each language.
Quickstart
uv pip install --prerelease=allow text2spoken
>>> from text2spoken import normalize
>>> normalize("Dr Smith paid £3.50 for 2 tickets on 14 March 2024.", "en-GB")
'Doctor Smith paid three pounds and fifty pence for two tickets on the fourteenth of March twenty twenty-four.'
>>> normalize("Meet on 03/04/2025 at 7:30 pm.", "en-US")
'Meet on March fourth twenty twenty-five at seven thirty PM.'
>>> normalize("O Dr. Silva pagou 2,50 € às 14:30.", "pt-PT")
'O Doutor Silva pagou dois euros e cinquenta cêntimos às catorze e trinta.'
The second argument is a BCP 47 tag. It selects the language file and the variety. The library needs Python 3.11 or later. Every language reads with the base install.
Find your answer
| You want to | Read |
|---|---|
| Install it and make a first call | Quickstart |
| Turn a form off or on, or add your own words | Usage |
Read a form that SSML say-as markup names |
API, say_as |
| Know why a text reads as it does | How it reads text |
| See which forms each language reads | Languages at a glance |
| See how a text goes through the library | How it works |
| See what a call costs, and warm up a server | Performance, Threads and servers |
| Find out why a text stayed as written | Troubleshooting |
| Add your language, step by step | Adding a language |
| Look up a function, a param or an error | API, Errors and warnings |
| Know which installed versions write the output of a language | API, revision |
| Use it before a phonemizer, a voice or a word error rate score | How it works, where it fits, Usage |
| See the languages and their varieties | Docs index, languages |
| Run the tests | Development |
The docs index lists every page in reading order. A contributor reads AGENTS.md for the map of the repository and the rules that a pull request must meet.
Licence
Apache-2.0, in LICENSE. The CLDR data in text2spoken/data/cldr/ ships under the Unicode License v3.
Metadata
Release files for text2spoken 0.0.2a264
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 |
|---|---|---|---|---|
| text2spoken-0.0.2a264.tar.gz | 2.7 MB | Without provenance | Details for text2spoken-0.0.2a264.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| text2spoken-0.0.2a264-py3-none-any.whl | Python 3 | none | any | Details for text2spoken-0.0.2a264-py3-none-any.whl |
Total release size: 5.3 MB
Release files / text2spoken-0.0.2a264.tar.gz
| Download URL | text2spoken-0.0.2a264.tar.gz |
|---|---|
| Size | 2.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da51ccce621a38c3abc4bce5f9b992455a7e9709ba7b2704187467d2ef57e29f
|
|
BLAKE2b-256 checksum How to use checksums |
510b7b1e75f6cecd710409fb4ca8371ea318249a92a14c7a2f0eac5dd7ad1c56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / text2spoken-0.0.2a264-py3-none-any.whl
| Download URL | text2spoken-0.0.2a264-py3-none-any.whl |
|---|---|
| Size | 2.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83d0f37d9eea53924a2fe09b705aa14eb53a0ddf14c1dde161a5829e52e71504
|
|
BLAKE2b-256 checksum How to use checksums |
77b644f7439c611c0e1494633930525274025a90ea08c6caec67eedd1558b822
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for text2spoken 0.0.2a264
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.