en-tts
Web app, command-line interface and Python library for synthesizing English texts into speech.
Installation
pip install en-tts --user
Usage as web app
Visit 🤗 Hugging Face for a live demo.
You can also run it locally be executing en-tts-web in CLI and opening your browser on http://127.0.0.1:7860.
Usage as CLI
en-tts-cli synthesize "When the sunlight strikes raindrops in the air, they act as a prism and form a rainbow."
The output can be listened here.
Usage as library
from pathlib import Path
from tempfile import gettempdir
from en_tts import Synthesizer, Transcriber, normalize_audio, save_audio
text = "When the sunlight strikes raindrops in the air, they act as a prism and form a rainbow."
transcriber = Transcriber()
synthesizer = Synthesizer()
text_ipa = transcriber.transcribe_to_ipa(text)
audio = synthesizer.synthesize(text_ipa)
tmp_dir = Path(gettempdir())
save_audio(audio, tmp_dir / "output.wav")
# Optional: normalize output
normalize_audio(tmp_dir / "output.wav", tmp_dir / "output_norm.wav")
Model info
The used TTS model is published here.
Evaluation results:
- MOS naturalness: 3.55 ± 0.28 (GT: 4.17 ± 0.23)
- MOS intelligibility: 4.44 ± 0.24 (GT: 4.63 ± 0.19)
- Mean MCD-DTW: 29.15
- Mean penalty: 0.1018
Phoneme set
- Vowels: i, u, æ, ɑ, ɔ, ə, ɛ, ɪ, ʊ, ʌ
- Diphthongs: aɪ, aʊ, eɪ, oʊ, ɔɪ
- R-colored vowels: ɔr, ər, ɛr, ɪr, ʊr, ʌr
- Consonants: b, d, dʒ, f, h, j, k, l, m, n, p, r, s, t, tʃ, v, w, z, ð, ŋ, ɡ, ʃ, θ
- Breaks:
- SIL0 (no break)
- SIL1 (short break)
- SIL2 (break)
- SIL3 (long break)
- Special characters: . ? ! , : ; - — " ' ( ) [ ]
Each vowel, diphthong, r-colored vowel and consonant can have one of these duration markers:
- ˘ -> very short, e.g., oʊ˘
- nothing -> normal, e.g., oʊ
- ˑ -> half long, e.g., oʊˑ
- ː -> long, e.g., oʊː
Furthermore, each vowel, diphthong and r-colored vowel can have a leading stress symbol attached:
- ˈ -> primary stress, e.g., ˈoʊ
- ˌ -> secondary stress, e.g., ˌoʊ
- nothing -> no stress, e.g., oʊ
Stress and duration markers can be combined, e.g., ˌoʊː
Citation
If you want to cite this repo, you can use the BibTeX-entry generated by GitHub (see About => Cite this repository).
- Taubert, S. (2024). en-tts (Version 0.0.2) [Computer software]. https://doi.org/10.5281/zenodo.11032264
Acknowledgments
Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – Project-ID 416228727 – CRC 1410
The authors gratefully acknowledge the GWK support for funding this project by providing computing time through the Center for Information Services and HPC (ZIH) at TU Dresden.
The authors are grateful to the Center for Information Services and High Performance Computing [Zentrum fur Informationsdienste und Hochleistungsrechnen (ZIH)] at TU Dresden for providing its facilities for high throughput calculations.
Metadata
Release files for en-tts 0.0.2
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 |
|---|---|---|---|---|
| en_tts-0.0.2.tar.gz | 512.0 kB | Without provenance | Details for en_tts-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| en_tts-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for en_tts-0.0.2-py3-none-any.whl |
Total release size: 538.6 kB
Release files / en_tts-0.0.2.tar.gz
| Download URL | en_tts-0.0.2.tar.gz |
|---|---|
| Size | 512.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6487b2d7fc41249f5a5ab72ba74c4051a5f20157973918a2ff15819fd19285ac
|
|
BLAKE2b-256 checksum How to use checksums |
1fbe77e64915c75b52335242f6427bfc213f133ecd57ecee99038454d03c2e5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.7
|
Release files / en_tts-0.0.2-py3-none-any.whl
| Download URL | en_tts-0.0.2-py3-none-any.whl |
|---|---|
| Size | 26.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc082decdc2f5f9c2aabf485802d6bdd059c87a09e1b501aa0f118f6b13328bb
|
|
BLAKE2b-256 checksum How to use checksums |
a1b626552015973d562655df43ef5494f08db95b70350531a76cba0775c98180
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.7
|
Security for en-tts 0.0.2
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.