Epitran: Precision G2P for Many Languages
Summary
Many speech and NLP pipelines need a grapheme-to-phoneme (G2P) step. Research has mostly targeted hard orthographies such as English, while many low-resource languages with fairly transparent spelling lack good tools. Existing options fall short: Unitran handles no Roman scripts and cannot tell apart languages sharing a script, such as Amharic and Tigrinya. URoman only romanizes and does not produce phonemes. The authors present Epitran, an open-source Python library (MIT license) that turns orthographic word tokens into IPA or X-SAMPA for 61 languages. It sits on top of several back-ends. Flite serves English, Epihan serves Chinese, and a rule-based "Simple Epitran" covers everything else, using CSV mapping tables plus optional pre- and post-processing rewrite rules. Because the output is rule-based, every word gets a pronunciation and the mapping is fully consistent. In ASR experiments, Epitran-based pronunciations lowered word error rate compared with Babel baselines. The tool also supported cross-lingual transfer, entity linking and annotation work in DARPA LORELEI. This makes it a practical way to place many languages in one shared phonetic space.
Key points
-
Epitran ships with 61 languages and outputs IPA, which works with PanPhon, or X-SAMPA. It runs on Python 2 and 3, and its main API methods are
transliterate,xsampa_list,trans_listandtrans_delimiter. -
It has three back-ends:
- Flite (
lex_lookup), which is used to handle English. - Epihan, which covers Chinese in both its Simplified and Traditional scripts and requires the CC-CEDict dictionary.
- Simple Epitran for all other languages, which needs no extra software.
- Flite (
-
Modes are defined per language-script pair (e.g.
tir-Ethi,kaz-Cyrl,aze-Latn). Variants include:- naive phonemic (
-np); - reduced phoneme inventory (
-red); - preprocessed (
-pp); - Babel-oriented (
-bab).
Arabic, Persian and Urdu are rendered without short vowels.
- naive phonemic (
-
For ASR, the authors trained models on six IARPA Babel releases, and models using Epitran lowered WER compared with the Babel baselines.
-
Other uses within the ARIEL/LORELEI team:
- transferring ASR models from Amharic to Tigrinya and Oromo;
- merging Amharic datasets from different sources;
- transferring NER from Uzbek and Turkish to Uyghur (Bharadwaj et al., 2016);
- training a polyglot MT model on IPA;
- entity linking into English.
Interesting ideas
- I1. Two-column CSV maps with greedy longest-match. The order of rows does not matter, so tables copied from Wikipedia, Omniglot or grammar books can be used almost directly. This keeps the barrier low for adding a new language or dialect.
- I2. Rewrite-rule cascades before and after the mapping. These rules support named constants, such as a regex class for consonants. The Tigrinya example inserts a predictable vowel this way, showing that a simple table plus a few context rules can cover non-trivial orthographies.
- I3. Plain Python and regex instead of XFST/Foma. The authors kept dependencies limited to pip, avoided reordering rules programmatically, and made metathesis easy to write. This is a good reminder that the theoretically elegant tool is not always the most maintainable one.
- I4. Modes keyed by language plus script, with alternates. Separate modes for the same language (reduced inventory, naive phonemic) let users trade precision against a smaller label set. This design suits any multi-script or multi-variety resource, and it makes explicit choices such as which Spanish variety to model.
- I5. Rule-based G2P as a consistency and readability tool. Deterministic output avoids the label noise that comes from annotators disagreeing on similar phonemes. IPA output also lets non-speakers annotate named entities in unfamiliar scripts, which is a cheap help for annotation in low-resource projects.
Cited by
- Bridging Laughter Across Languages: Generation of Hindi-English Code-mixed Puns
- Language ID in the Wild: Unexpected Challenges on the Path to a Thousand-Language Web Text Corpus
- Counting the Bugs in ChatGPT's Wugs: A Multilingual Investigation into the Morphological Capabilities of a Large Language Model
- Deciphering Undersegmented Ancient Scripts Using Phonetic Prior
Cite
@inproceedings{mortensen2018epitran,
title = {{Epitran: Precision G2P for Many Languages}},
author = {Mortensen, David R. and Dalmia, Siddharth and Littell, Patrick},
booktitle = {Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018)},
year = {2018},
doi = {10.63317/57n9v6em7ihu},
url = {https://doi.org/10.63317/57n9v6em7ihu}
}References
- Bharadwaj, A., Mortensen, D., Dyer, C., and Carbonell, J. G. (2016). Phonologically aware neural model for named entity recognition in low resource transfer settings. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1462–1472, August. find
- Bisani, M. and Ney, H. (2008). Joint-sequence models for grapheme-to-phoneme conversion. Speech Communication, 50(5):434–451, May. find
- Black, A. W. and Lenzo, K. (2001). Flite: a small fast runtime synthesis engine. In ISCA, 4th Speech Synthesis Workshop, pages 157–162, Scotland. find
- Black, A. W., Lenzo, K., and Pagel, V. (1998). Issues in building general letter to sound rules. In 3rd ESCA Workshop on Speech Synthesis, pages 77–80. find
- Daelemans, W. and van den Bosch, A., (1996). Language-Independent Data-Oriented Grapheme-to-Phoneme Conversion, pages 77–90. Springer Verlag, New York. find
- Laurent, A., Deléglise, P., and Meignier, S. (2009). Grapheme to phoneme conversion using an SMT system. In 10th Annual Conference of the International Speech Communication Association 2009 (IN-TERSPEECH 2009), pages 716–719, Brighton, United Kingdom, September. find
- Luong, H.-T. and Vu, H.-Q. (2016). A non-expert Kaldi recipe for Vietnamese speech recognition system. In Proceedings of WLSI/OIAF4HLT, Osaka, Japan, December. find
- Miao, Y., Gowayyed, M., and Metze, F. (2015). EESEN: End-to-End Speech Recognition using Deep RNN Models and WFST-based Decoding. ArXiv e-prints, July. find
- Mortensen, D. R., Littell, P., Bharadwaj, A., Goyal, K., Dyer, C., and Levin, L. (2016). Panphon: A resource for mapping IPA segments to articulatory feature vectors. In Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, pages 3475–3484, Osa… find
- Qian, T., Hollingshead, K., Yoon, S., Kim, K., and Sproat, R. (2010). A Python toolkit for universal transliteration. In Nicoletta Calzolari (Conference Chair), et al., editors, Proceedings of the Seventh International Conference on Language Resources and Evaluation (LREC’10), Valletta, Malta, may.… find
- Rao, K., Peng, F., Sak, H., and Beaufays, F. (2015). Grapheme-to-phoneme conversion using Long Short-Term Memory recurrent neural networks. In 2015 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 4225–4229, April. find
- Sproat, R. (2006). A Computational Theory of Writing Systems. Cambridge University Press, Cambridge. find
This page in Markdown → https://md.research.elamur.ai/free/en/papers/mortensen-2018-epitran-precision-g2p-many-languages/