Skip to main content

uccharan (Python)

5× faster than espeak-ng. Just as accurate. Free to ship. A drop-in phonemiser for Piper, Kokoro and sherpa-onnx voices — English, Hindi and nineteen more South Asian languages, in Rust, Python, C and the browser. Apache-2.0. (measurements)

Permissively licensed text-to-phoneme conversion for neural TTS: English (US, British RP), Hindi and Hinglish, in the shapes Piper, Kokoro, Kitten TTS, Matcha-TTS and sherpa-onnx voices expect. No GPL code or data; no runtime dependencies.

pip install uccharan
import uccharan

uccharan.phonemize("Hello, world.")                          # 'həlˈoʊ, wˈɜːld.'
uccharan.phonemize("नमस्ते दुनिया", lang="hi")                  # 'nəmˈʌsteː dˈʊnɪjˌaː'
uccharan.phonemize("Hi there. Bye!", "en-us", "piper")       # ['hˈaɪ ðˈɛɹ.', 'bˈaɪ!']
uccharan.phonemize("Hi there.", "en-us", "sherpa-onnx")      # [[104, 712, 97, 618, …]]
uccharan.phonemize("I read it yesterday.", improved=True)    # 'aɪ ɹˈɛd ɪt jˈɛstɚdˌeɪ.'
uccharan.phonemize("I read the book.", "en-us", "kokoro")    # 'ˌI ɹˈɛd ðə bˈʊk.'  (misaki conventions, for Kokoro)
uccharan.phonemize_batch(lines, "hi")                        # all cores, GIL released

For code written against phonemizer:

from uccharan.compat import EspeakBackend
backend = EspeakBackend("en-us", preserve_punctuation=True, with_stress=True)
backend.phonemize(["Hello, world."], strip=True)             # ['həlˈoʊ, wˈɜːld.']

A command-line program is installed as uccharan (uccharan -l hi -p piper "नमस्ते").

English for Kokoro uses a port of misaki with misaki 0.9.4's dictionaries; load_misaki(dir) loads another copy.

The wheel carries the en-US, Hindi and other South Asian language data. British English and the Kokoro English data are language packs: downloaded from the GitHub release of the same version the first time they are needed, checked against SHA-256 sums inside the wheel, and cached in ~/.cache/uccharan. On an offline machine put the .ucd files (from the release page) in a directory named by UCCHARAN_DATA_DIR, set UCCHARAN_OFFLINE=1 to forbid downloads, or call uccharan.load_pack(path).

Documentation, measured agreement, speed and end-to-end results: https://github.com/cB-Sigma/uccharan.

Licence

Licence: Apache-2.0. Includes data from the CMU Pronouncing Dictionary (BSD-2-Clause) and misaki (Apache-2.0); see NOTICE.

Metadata

Release files for uccharan 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uccharan 0.2.0
File Size Uploaded Provenance Actions
uccharan-0.2.0.tar.gz 5.5 MB Without provenance Details for uccharan-0.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for uccharan 0.2.0
File Actions
uccharan-0.2.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for uccharan-0.2.0-cp39-abi3-win_amd64.whl
uccharan-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for uccharan-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
uccharan-0.2.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for uccharan-0.2.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
uccharan-0.2.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for uccharan-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
uccharan-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for uccharan-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 15.0 MB

Release files / uccharan-0.2.0.tar.gz

Download URL uccharan-0.2.0.tar.gz
Size 5.5 MB
Tags Source
SHA-256 checksum
How to use checksums
1e0fe7e81a384299197d7c498b184d2184145e4549387e0e26bd0fe7bc7ac278
BLAKE2b-256 checksum
How to use checksums
a898b41d026a9c63c9a4aa22c140b399a9bcc0c224ffdd75e018756450bd5fc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / uccharan-0.2.0-cp39-abi3-win_amd64.whl

Download URL uccharan-0.2.0-cp39-abi3-win_amd64.whl
Size 1.8 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f6d00850b431f8101467b09f70492f138be60a8f9af01d74188733a1752cfa4c
BLAKE2b-256 checksum
How to use checksums
7e7cf894a88d1d8fc7c9370ae692b2d726fc283c359f70af2bde96cb965224ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / uccharan-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL uccharan-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 1.9 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
8335209024e41d134cf3f474720f299e3b9114d0db511e0c7c83cf9d42e10b14
BLAKE2b-256 checksum
How to use checksums
87502505610b25f449610934e75d8a75f4d657c86e3b6ce3942ff1582f19584d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / uccharan-0.2.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL uccharan-0.2.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.9 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
03181b6a73accf20142e521d98c9713176f5bc1115ea6714bb50f3c2ae18cb32
BLAKE2b-256 checksum
How to use checksums
1eafeaed91c6a9221e82cc605135730bc7dd4a013d988166bf51b28d9c6efd55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / uccharan-0.2.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL uccharan-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
Size 1.9 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3516dadc1c848c415dadd4b15d602eabcc2518bef0f9a45f0bf2e47c2bd0f994
BLAKE2b-256 checksum
How to use checksums
5759269d3ed29d1b294c32db3448323b15da609170fa1e947d825ac55c0e8bf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / uccharan-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL uccharan-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 1.9 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f15933a84fd7611e99b906efc2f80e4401a3c6bddb5baab0d17dcd784a3fb4f0
BLAKE2b-256 checksum
How to use checksums
6b66f5f4638cc95b0f5db671698ad05f1f887ad4c11ca9fb87dbc3454dcca9ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for uccharan 0.2.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page