Registry / data / epitran

epitran

JSON →
library1.35.1pypypi✓ verified 85d ago

Epitran is a library for transliterating text written in various writing systems into the International Phonetic Alphabet (IPA). Version 1.35.1 supports 50+ languages and scripts. Release cadence is irregular, with multiple releases in 2025-2026.

pip install epitran
INSTALL
IMPORT
SIG · EPITRAN
E
epitran
datapythonv1.35.1
Install
10.8s avg
Import
1767ms
Disk
190MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.35.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 10.3s
py 3.11
✓ —
✓ 9.6s
py 3.12
✓ —
✓ 10.8s
py 3.13
✕ build_error
✕ build_error
py 3.9
✓ —
✓ 12.3s
190MB installed
● package 190MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Epitran
from epitran import Epitran
Standard import path.

Initialize Epitran with a language code (e.g., 'eng-Latn') and call .transliterate() to convert text to IPA.

from epitran import Epitran # Create an Epitran object for English (eng-Latn) epi = Epitran('eng-Latn') # Transcribe a word to IPA ipa = epi.transliterate('hello') print(ipa) # Output: həlˈoʊ
Debug
Known issues
gotchaEpitran requires a language code in language-scrīpt format (e.g., 'spa-Latn' for Spanish). Using just 'en' will raise a ValueError.
fix
Use the exact language-script code as specified in the documentation (e.g., 'eng-Latn', 'cmn-Hans').
affects: all
gotchaEpitran uses a local data directory (~/.epitran) for lookup tables. If the data is missing, operations will fail silently or throw errors.
fix
Run `epitran -d` after installation to download and set up the data, or let Epitran auto-download on first import (requires internet).
affects: all
deprecatedThe old `epitran.Epitran()` instantiator may not work with Python < 3.10; as of v1.35.1, Python >=3.10 is required.
fix
Upgrade Python to 3.10 or later. If stuck on older Python, use epitran < 1.35.0.
affects: >=1.35.0
breakingIn v1.34.0, the internal data format changed. Code relying on direct file access to ~/.epitran may break.
fix
Use the public API (Epitran class) only; avoid reading data files directly.
affects: >=1.34.0
Errors
Common errors & fixes
ValueError: Unsupported language: en
Using a plain language code without script (e.g., 'en' instead of 'eng-Latn').
fix
Use full language-script code, e.g., `Epitran('eng-Latn')`. List supported codes: `epitran.list_languages()`.
epitran.Epitran not found
Importing the class incorrectly as `epitran.Epitran` instead of `from epitran import Epitran`.
fix
Import using `from epitran import Epitran`.
FileNotFoundError: [Errno 2] No such file or directory: '.../epitran/data/...'
Epitran data directory (~/.epitran) is missing or incomplete.
fix
Run `epitran -d` on the command line to download all required data. Ensure internet connectivity.
Upgrade
Version history
1.35.1latest on PyPI · released Apr 24, 2026
Audit
Dependencies
unidecoderequiredUsed for transliteration of non-ASCII scripts
Agent activity
4 hits · last 30 days
node
4
Resources
epitran — pip install epitran · libregistry