A grapheme-to-phoneme conversion library with mixed models (rule-based and neural). Version 0.6.5. Irregular releases.
pip install g2p-mixNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize G2pMix and convert Chinese text to phonemes.
Access phonemes via dict keys (e.g., result[0]['phonemes']) instead of tuple indexing.
Pre-process text to ensure only Chinese characters are passed, or handle non-Chinese separately.
Set environment variable G2PMIX_DATA_DIR to a custom path to control cache location.
Use 'from g2p_mix import G2pMix' (underscore, not hyphen).
Upgrade: pip install --upgrade g2p-mix
Update result access: result[0]['phonemes'] instead of phoneme, tone = result[0]