Utilities API
This page documents utility modules and helper functions.
Token Context
Fallback Handling
The fallback module provides functionality for handling out-of-vocabulary words:
Fallback options for OOV words with IPA to Kokoro conversion.
- class kokorog2p.en.fallback.EspeakFallback(british: bool = False, use_cli: bool = False)[source]
Bases:
FallbackBase[EspeakBackend]Fallback G2P using espeak-ng with Kokoro phoneme conversion.
- install_hint: str = 'Check that espeak-ng is properly installed.'
Extra hint appended to backend-init error logs (RuntimeError).
- class kokorog2p.en.fallback.GoruutFallback(british: bool = False)[source]
Bases:
FallbackBase[GoruutBackend]Fallback G2P using goruut with Kokoro phoneme conversion.
- install_hint: str = 'Check that pygoruut is properly installed.'
Extra hint appended to backend-init error logs (RuntimeError).
Internal Utilities
These are internal utilities used by the library. They may change without notice.
Lexicon Utilities
Functions for working with lexicons and dictionaries.
Number Processing
Internal number processing utilities shared across languages.