Syllabify
Automatically convert plain text into phonemes (US English pronunciation) and syllabify.
Modified from the repository set up by Andrew Caines with some key changes, itemised below:
- Environment management using uv
- Python 3.10+ compatibility
- Easy to access class and function interfaces
- Use up-to-date cmudict versioned by python-cmudict
Credits: Many thanks for @cainesap's work on porting and fixes & the original author @anthonysgevans
Set up
Requires Python 3 (Anthony Evans used Python 2: if that's what you prefer, see his repo).
pip install syllabify
Usage
Package interface
from syllabify import syllabify
word = syllabify("linguistics")
print(word)
L IH0 NG {onset: L, nucleus: IH0, coda: NG}
G W IH1 {onset: GW, nucleus: IH1, coda: empty}
S T IH0 K S {onset: ST, nucleus: IH0, coda: KS}
You can get the onset, nucleus, and coda of each syllable:
from syllabify import syllabify
word = syllabify("linguistics")
for syllable in word.syllables:
print(f"Onset: {syllable.onset}")
print(f"Nucleus: {syllable.nucleus}")
print(f"Coda: {syllable.coda}")
Onset: L
Nucleus: IH0
Coda: NG
Onset: GW
Nucleus: IH1
Coda: empty
Onset: ST
Nucleus: IH0
Coda: KS
Command line interface
One word at a time:
syllabify linguistics
📝 Input: linguistics
🔤 Syllabification:
LIH0NG [L.IH0.NG] | ˈGWIH1 [GW.IH1.∅] | STIH0KS [ST.IH0.KS]
📖 Legend:
[onset.nucleus.coda] = syllable structure
∅ = empty position
ˈ = primary stress
ˌ = secondary stress
| = syllable boundary
Or several (space-separated):
syllabify colorless green ideas
📝 Input: colorless green ideas
🔤 Syllabification:
ˈKAH1 [K.AH1.∅] | LER0 [L.ER0.∅] | LAH0S [L.AH0.S]
ˈGRIY1N [GR.IY1.N]
AY0 [∅.AY0.∅] | ˈDIY1 [D.IY1.∅] | AH0Z [∅.AH0.Z]
📖 Legend:
[onset.nucleus.coda] = syllable structure
∅ = empty position
ˈ = primary stress
ˌ = secondary stress
| = syllable boundary
Metadata
Release files for syllabify 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| syllabify-0.5.1.tar.gz | 28.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| syllabify-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.3 kB
Release files / syllabify-0.5.1.tar.gz
| Download URL | syllabify-0.5.1.tar.gz |
|---|---|
| Size | 28.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2d98651f10732121f542a398103434d6583e2c528dc264d22180b438f736aae
|
|
BLAKE2b-256 checksum How to use checksums |
e11fcf9f93e3df67ce3e2a846ec60fbf424a6dfbe0caab339baa5f4fd3696ba5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency logRelease files / syllabify-0.5.1-py3-none-any.whl
| Download URL | syllabify-0.5.1-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab51777465c9ac649e864bd5dd7f74dadaf2a82063ca5ed2e400f73bb53d7676
|
|
BLAKE2b-256 checksum How to use checksums |
4fd7c8bf50261e805612b622b90e969002301b382a2b275738fb6049d7685b19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 16, 2026.
Transparency log