{"id":23085,"library":"epitran","title":"Epitran","description":"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.","status":"active","version":"1.35.1","language":"python","source_language":"en","source_url":"https://github.com/dmort27/epitran","tags":["ipa","transliteration","phonetics","natural-language-processing"],"install":[{"cmd":"pip install epitran","lang":"bash","label":"Stable install"}],"dependencies":[{"reason":"Used for transliteration of non-ASCII scripts","package":"unidecode","optional":false}],"imports":[{"note":"Standard import path.","wrong":null,"symbol":"Epitran","correct":"from epitran import Epitran"}],"quickstart":{"code":"from epitran import Epitran\n\n# Create an Epitran object for English (eng-Latn)\nepi = Epitran('eng-Latn')\n\n# Transcribe a word to IPA\nipa = epi.transliterate('hello')\nprint(ipa)  # Output: həlˈoʊ\n","lang":"python","description":"Initialize Epitran with a language code (e.g., 'eng-Latn') and call .transliterate() to convert text to IPA."},"warnings":[{"fix":"Use the exact language-script code as specified in the documentation (e.g., 'eng-Latn', 'cmn-Hans').","message":"Epitran requires a language code in language-scrīpt format (e.g., 'spa-Latn' for Spanish). Using just 'en' will raise a ValueError.","severity":"gotcha","affected_versions":"all"},{"fix":"Run `epitran -d` after installation to download and set up the data, or let Epitran auto-download on first import (requires internet).","message":"Epitran uses a local data directory (~/.epitran) for lookup tables. If the data is missing, operations will fail silently or throw errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade Python to 3.10 or later. If stuck on older Python, use epitran < 1.35.0.","message":"The old `epitran.Epitran()` instantiator may not work with Python < 3.10; as of v1.35.1, Python >=3.10 is required.","severity":"deprecated","affected_versions":">=1.35.0"},{"fix":"Use the public API (Epitran class) only; avoid reading data files directly.","message":"In v1.34.0, the internal data format changed. Code relying on direct file access to ~/.epitran may break.","severity":"breaking","affected_versions":">=1.34.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use full language-script code, e.g., `Epitran('eng-Latn')`. List supported codes: `epitran.list_languages()`.","cause":"Using a plain language code without script (e.g., 'en' instead of 'eng-Latn').","error":"ValueError: Unsupported language: en"},{"fix":"Import using `from epitran import Epitran`.","cause":"Importing the class incorrectly as `epitran.Epitran` instead of `from epitran import Epitran`.","error":"epitran.Epitran not found"},{"fix":"Run `epitran -d` on the command line to download all required data. Ensure internet connectivity.","cause":"Epitran data directory (~/.epitran) is missing or incomplete.","error":"FileNotFoundError: [Errno 2] No such file or directory: '.../epitran/data/...'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}