orthography2ipa
Linguistically motivated grapheme-to-IPA and allophone mappings for 350+ language codes
What it is and what it does
orthography2ipa is a linguistically motivated library for converting written text to IPA phonetic notation and measuring how languages relate to each other. It ships with data specs for 676 languages and 73 clade nodes covering major language families, reconstructed proto-languages, dialects, and creoles. Rather than learning phoneme-to-sound mappings from weights, the library uses declarative per-language JSON specs that define graphemes, phonemes, allophones, positional rules, and genealogical metadata. A shared, language-agnostic engine applies these specs to produce transcriptions and confidence scores.
The library's core insight is that language similarity is multidimensional: two languages can sound alike but write differently, or vice versa. It measures each axis independently—phonological inventory overlap, how the same text sounds across languages, how the same sounds are spelled, script typology, ancestry, temporal span, and geographic distance. When spelling is ambiguous, the engine builds a ranked lattice of possible pronunciations with costs, allowing downstream systems to refine choices via custom rescoring rules. It also handles edge cases like logographic scripts (Chinese Hanzi has no grapheme map but a full phonology) and reconstructed languages (Proto-Indo-European declares its phonemes directly).
Use it for:
- Transcribe text to IPA for linguistic research, speech synthesis, or phonetic analysis across hundreds of language varieties.
- Measure phonological and orthographic distance between language pairs to study mutual intelligibility or dialect relationships.
- Build multilingual text-to-speech systems that need per-language grapheme-to-phoneme rules without training separate models.
- Analyze how spelling conventions diverge from pronunciation in a single language or across related languages.
- Refine ambiguous transcriptions using custom rescoring rules for domain-specific or specialized phonetic contexts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts spelling to IPA phonetic transcription and measures language similarity across independent axes: phonology, reading, spelling, script, genealogy, time, and geography.
Yes, if you need IPA transcription or language similarity metrics for research or NLP. The library is actively maintained, has no known vulnerabilities, and covers a broad language base. The Alpha status and early release history mean the API and data specs may shift; verify transcription accuracy for your specific languages before production use. Low install friction and permissive licensing make it a low-risk addition.
Install
orthography2ipa on PyPI
pip
pip install orthography2ipauv
uv add orthography2ipapoetry
poetry add orthography2ipaInstalling orthography2ipa
Before you install
Active maintenance with a recent release (29 days old). Low install friction: pure Python wheel with three runtime dependencies (numpy, langcodes, ovos-spec-tools). Supports current Python versions (3.10–3.13).
License in practice
Apache-2.0 permissive license allows commercial and private use with attribution and liability disclaimers. No copyleft obligations.
Quickstart
pip install orthography2ipa
import orthography2ipa
result = orthography2ipa.transcribe("olá mundo", "pt")
print(result) # 'oˈla ˈmũdu'
Requires Python 3.10 or later.
Verify before relying
- Actual accuracy of IPA transcriptions across the 676 supported languages and dialects.
- Performance characteristics when processing large text volumes or many languages.
- Stability of the API and data format given the Alpha development status.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — numpy, langcodes, ovos-spec-tools |
| Maintenance | actively maintained — 29 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 107,342/month — #12,617 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: orthography2ipa-7.30.0-py3-none-any.whl
Keywords: ipa, phonetics, phonology, grapheme, allophone, linguistics, nlp
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
epitranEpitran converts written text in various…
permissive · top 15,000 on PyPI
g2p-enConverts English text to phoneme sequences…
permissive · top 5,000 on PyPI
misakiConverts written text to phonetic…
permissive · top 15,000 on PyPI
gruut-ipaGruut IPA parses, analyzes, and converts…
permissive · top 15,000 on PyPI
phonemizerPhonemizer converts written text into phonetic…
copyleft · top 15,000 on PyPI
panphonPanPhon maps International Phonetic Alphabet…
permissive · top 15,000 on PyPI
phonemizer-forkConverts text to phonetic representations…
copyleft · top 5,000 on PyPI
gruutGruut tokenizes, cleans, and converts text to…
permissive · top 15,000 on PyPI
gruut-lang-enProvides English language data files for…
permissive · top 15,000 on PyPI
soundexImplements the Soundex phonetic algorithm for…
copyleft · top 15,000 on PyPI