Context-aware, rule-based grapheme-to-phoneme (G2P) mapping library that preserves indices. Version 2.3.1 (stable, as of 2025). Maintained by NRC-ILT. Monthly releases.
pip install g2pNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage: load a built-in mapping and convert text.
Rewrite mappings for v2.x. Use make_g2p() instead of direct G2P class.
Use tokenize=True/False instead of tok_lang. If you need to disable tokenization, pass tokenize=False.
Consider lazy-loading or using a non-English mapping to avoid the delay.
Upgrade to g2p>=2.0 and use 'from g2p import make_g2p'.
Upgrade to g2p>=2.1.1 or install networkx manually: pip install networkx.