zho-tts
Web app, command-line interface and Python library for synthesizing Chinese texts into speech.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 9 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.1%) to scientific vocabulary
Keywords
Repository
Web app, command-line interface and Python library for synthesizing Chinese texts into speech.
Basic Info
- Host: GitHub
- Owner: stefantaubert
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://hf.co/spaces/stefantaubert/zho-tts
- Size: 2.04 MB
Statistics
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
- Releases: 2
Topics
Metadata Files
README.md
zho-tts
Web app, command-line interface and Python library for synthesizing Chinese texts into speech.
Installation
sh
pip install zho-tts --user
Usage as web app
Visit 🤗 Hugging Face for a live demo.
You can also run it locally be executing zho-tts-web in CLI and opening your browser on http://127.0.0.1:7860.
Usage as CLI
sh
zho-tts-cli synthesize "长江 航务 管理局 和 长江 轮船 总公司 最近 决定 安排 一百三十三 艘 客轮 迎接 长江 干线 春运。"
The output can be listened here.
```sh
Same example using IPA input
zho-tts-cli synthesize-ipa "ʈʂː|a˧˩˧˘|ŋ|tɕ˘|j|a˥˘|ŋ˘|SIL0|x|a˧˥˘|ŋ|u˥˩|SIL0|k|w|a˧˩˧|n|l˘|i˧˩˧|tɕː|y˧˥ˑ|SIL0|x|ɤ˧˥|SIL0|ʈʂː|a˧˩˧˘|ŋ|tɕ˘|j|a˥˘|ŋ|SIL0|l|w|ə˧˥|n|ʈʂʰ˘|w|a˧˥|n|SIL0|ts˘|ʊ˧˩˧|ŋ˘|kː|ʊ˥|ŋ|s|ɹ̩˥ˑ|SIL0|ts|w˘|ei̯˥˩|tɕ|i˥˩˘|n|SIL0|tɕ|ɥ|e˧˥|t|i˥˩|ŋ|SIL3|a˥|n|pʰ|ai̯˧˥|SIL0|i˥ˑ|p|ai̯˧˩˧|s|a˥˘|n|ʂ˘|ɻ̩˧˥|s|a˥|n|SIL0|s˘|ou̯˥|SIL0|kʰˑ|ɤ˥˩|lː|wˑ|ə˧˥ˑ|n|SIL0|i˧˥ː|ŋ|tɕ˘|j˘|e˥|SIL0|ʈʂː|a˧˩˧|ŋ|tɕ˘|j|a˥˘|ŋ|SIL0|k˘|a˥˩|n|ɕ|j˘|ɛ˥˩|n˘|SIL0|ʈʂʰˑ|w˘|ə˥˘|nː|y˥˩ˑ|nː|。" ```
The output can be listened here.
Usage as library
```py from pathlib import Path from tempfile import gettempdir
from zhotts import Synthesizer, Transcriber, normalizeaudio, save_audio
text = "长江 航务 管理局 和 长江 轮船 总公司 最近 决定 安排 一百三十三 艘 客轮 迎接 长江 干线 春运。"
transcriber = Transcriber() synthesizer = Synthesizer()
textipa = transcriber.transcribetoipa(text) audio = synthesizer.synthesize(textipa)
tmpdir = Path(gettempdir()) saveaudio(audio, tmp_dir / "output.wav")
Optional: normalize output
normalizeaudio(tmpdir / "output.wav", tmpdir / "outputnorm.wav") ```
Model info
The used TTS model is published here.
Phoneme set
- Vowels: a ɛ e ə ɚ ɤ i o u ʊ y
- Diphthongs: ai̯ au̯ ei̯ ou̯
- Consonants: f j k kʰ l m n p pʰ ɹ̩¹ ɻ¹ ɻ̩¹ s t ts tsʰ tɕ tɕʰ tʰ w x ŋ ɕ ɥ ʂ ʈʂ ʈʂʰ
- Breaks:
- SIL0 (no break)
- SIL1 (short break)
- SIL2 (break)
- SIL3 (long break)
- special characters: 。 ?
Vowels and diphthongs contain one of these tones:
- ˥ (first tone)
- ˧˥ (second tone)
- ˧˩˧ (third tone)
- ˥˩ (fourth tone)
- (none)
¹ These consonants contain also tones.
Vowels, diphthongs and consonants contain one of these duration markers:
- ˘ -> very short, e.g., ou̯˘
- nothing -> normal, e.g., ou̯
- ˑ -> half long, e.g., ou̯ˑ
- ː -> long, e.g., ou̯ː
Tones and duration markers can be combined, e.g., ə˧˥ː
Speakers

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). zho-tts (Version 0.0.2) [Computer software]. https://doi.org/10.5281/zenodo.11048515
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.
Owner
- Name: Stefan Taubert
- Login: stefantaubert
- Kind: user
- Location: Chemnitz, Germany
- Company: Chemnitz University of Technology
- Website: https://stefantaubert.com
- Twitter: Stefan_Taubert
- Repositories: 75
- Profile: https://github.com/stefantaubert
Currently I am working on my PhD about the topic of speech synthesis at Chemnitz University of Technology.
Citation (CITATION.cff)
cff-version: 1.2.0
title: zho-tts
abstract: Web app, command-line interface and Python library for synthesizing Chinese texts into speech.
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- email: github@stefantaubert.com
given-names: Stefan
family-names: Taubert
affiliation: Chemnitz University of Technology
orcid: 'https://orcid.org/0000-0002-4932-2874'
website: 'https://stefantaubert.com/'
version: 0.0.2
date-released: 2024-04-24
license: MIT
url: https://github.com/stefantaubert/zh-tts
doi: 10.5281/zenodo.11048515
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- autoflake * develop
- autopep8 * develop
- build * develop
- isort * develop
- pycodestyle * develop
- pylint * develop
- pytest * develop
- rope * develop
- twine * develop
- wget * develop
- zh-tts * develop
- TextGrid >=1.5
- ffmpy *
- matplotlib >=3.5.0
- numpy >=1.18.5
- ordered-set >=4.1.0
- pandas >=1.4.0
- scipy >=1.8.0
- tqdm >=4.63.0
- astroid ==3.0.2 develop
- autoflake ==2.2.1 develop
- autopep8 ==2.0.4 develop
- build ==1.0.3 develop
- certifi ==2023.11.17 develop
- cffi ==1.16.0 develop
- charset-normalizer ==3.3.2 develop
- contourpy ==1.2.0 develop
- cryptography ==41.0.7 develop
- cycler ==0.12.1 develop
- dill ==0.3.7 develop
- docutils ==0.20.1 develop
- exceptiongroup ==1.2.0 develop
- fonttools ==4.47.2 develop
- idna ==3.6 develop
- importlib-metadata ==7.0.1 develop
- iniconfig ==2.0.0 develop
- isort ==5.13.2 develop
- jaraco.classes ==3.3.0 develop
- jeepney ==0.8.0 develop
- keyring ==24.3.0 develop
- kiwisolver ==1.4.5 develop
- markdown-it-py ==3.0.0 develop
- matplotlib ==3.8.2 develop
- mccabe ==0.7.0 develop
- mdurl ==0.1.2 develop
- more-itertools ==10.2.0 develop
- nh3 ==0.2.15 develop
- numpy ==1.26.3 develop
- ordered-set ==4.1.0 develop
- packaging ==23.2 develop
- pandas ==2.1.4 develop
- pillow ==10.2.0 develop
- pkginfo ==1.9.6 develop
- platformdirs ==4.1.0 develop
- pluggy ==1.3.0 develop
- pycodestyle ==2.11.1 develop
- pycparser ==2.21 develop
- pyflakes ==3.2.0 develop
- pygments ==2.17.2 develop
- pylint ==3.0.3 develop
- pyparsing ==3.1.1 develop
- pyproject-hooks ==1.0.0 develop
- pytest ==7.4.4 develop
- python-dateutil ==2.8.2 develop
- pytoolconfig ==1.3.1 develop
- pytz ==2023.3.post1 develop
- readme-renderer ==42.0 develop
- requests ==2.31.0 develop
- requests-toolbelt ==1.0.0 develop
- rfc3986 ==2.0.0 develop
- rich ==13.7.0 develop
- rope ==1.11.0 develop
- scipy ==1.11.4 develop
- secretstorage ==3.3.3 develop
- six ==1.16.0 develop
- textgrid ==1.5 develop
- tomli ==2.0.1 develop
- tomlkit ==0.12.3 develop
- tqdm ==4.66.1 develop
- twine ==4.0.2 develop
- typing-extensions ==4.9.0 develop
- tzdata ==2023.4 develop
- urllib3 ==2.1.0 develop
- wget ==3.2 develop
- zh-tts * develop
- zipp ==3.17.0 develop
- contourpy ==1.2.0
- cycler ==0.12.1
- ffmpy ==0.3.1
- fonttools ==4.47.2
- kiwisolver ==1.4.5
- matplotlib ==3.8.2
- numpy ==1.26.3
- ordered-set ==4.1.0
- packaging ==23.2
- pandas ==2.1.4
- pillow ==10.2.0
- pyparsing ==3.1.1
- python-dateutil ==2.8.2
- pytz ==2023.3.post1
- scipy ==1.11.4
- six ==1.16.0
- textgrid ==1.5
- tqdm ==4.66.1
- tzdata ==2023.4
- TextGrid >=1.5
- matplotlib >=3.5.0
- numpy >=1.18.5
- ordered_set >=4.1.0
- pandas >=1.4.0
- scipy >=1.8.0
- tqdm >=4.63.0