cmudict
A versioned python wrapper package for The CMU Pronouncing Dictionary data files.
What it is and what it does
cmudict is a thin Python wrapper around The CMU Pronouncing Dictionary, a linguistic dataset of English word pronunciations in phonetic notation. It bundles the dictionary data files and exposes them through a simple API with three access patterns per file: raw string, binary stream, or minimally-processed Python structures. The package maintains compatibility with NLTK's cmudict interface, making it a drop-in alternative for projects already using that corpus reader.
The main use case is looking up how words are pronounced or extracting phonetic information for speech synthesis, voice recognition, poetry analysis, or linguistic research. It requires Python 3.9+ and has minimal dependencies—only two standard-library backports—making it straightforward to install and integrate into existing projects.
Use it for:
- Look up phonetic transcriptions of English words for speech synthesis or pronunciation guides.
- Extract phone inventories and phonetic symbols for linguistic analysis or NLP feature engineering.
- Build rhyming or alliteration detection tools by comparing phonetic representations.
- Migrate from NLTK's cmudict reader to a standalone, versioned dictionary package.
- Analyze poetry or song lyrics for phonetic patterns and stress patterns.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python access to the CMU Pronouncing Dictionary data files (phonetic transcriptions, phone inventories, and related linguistic data) with minimal processing and NLTK compatibility.
Yes, if you need English phonetic data. Low install friction, no security issues, active maintenance, and GPL-3.0-or-later licensing is straightforward for open-source projects. Not suitable for proprietary software without GPL compliance review. The NLTK compatibility makes it a practical choice for speech and linguistic work.
Install
cmudict on PyPI
pip
pip install cmudictuv
uv add cmudictpoetry
poetry add cmudictInstalling cmudict
Before you install
Low friction: pure Python wheel with only two standard-library backport dependencies (importlib-metadata, importlib-resources). Actively maintained with recent commits and stable production status.
License in practice
GPL-3.0-or-later (copyleft): any derivative work or software that links this package must be distributed under the same or compatible GPL license; proprietary or closed-source projects cannot use it without legal review.
Quickstart
pip install cmudict
import cmudict
# Access phonetic dictionary (NLTK-compatible)
dict_data = cmudict.dict()
# Or get raw string contents
dict_str = cmudict.dict_string()
Requires Python 3.9 or later (supports up to 3.14).
Verify before relying
- Size and memory footprint of the bundled CMU dictionary data files when loaded into memory.
- Performance characteristics when querying large phonetic datasets or iterating over all entries.
Package facts
| License | GPL-3.0-or-later (copyleft) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — importlib-metadata, importlib-resources |
| Maintenance | actively maintained — 223 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 359,284/month — #7,251 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cmudict-1.1.3-py3-none-any.whl
Keywords: cmudict
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pronouncingProvides a simple Python interface to query the…
permissive · top 15,000 on PyPI
phoneticsComputes phonetic keys of strings using…
permissive · top 15,000 on PyPI
g2p-enConverts English text to phoneme sequences…
permissive · top 5,000 on PyPI
ko-speech-toolsProvides Korean language processing tools…
permissive · top 15,000 on PyPI
pyphoneticsPyphonetics implements phonetic matching…
permissive · top 15,000 on PyPI
phonemizerPhonemizer converts written text into phonetic…
copyleft · top 15,000 on PyPI
MetaphoneImplements the Metaphone and Double Metaphone…
permissive · top 15,000 on PyPI
soundexImplements the Soundex phonetic algorithm for…
copyleft · top 15,000 on PyPI
praat-parselmouthParselmouth provides a Pythonic interface to…
copyleft · top 15,000 on PyPI
g2pkkg2pkk converts Korean text to phonetic…
permissive · top 15,000 on PyPI