UNPKG

phonemize

Version:

Fast phonemizer with rule-based G2P prediction. Pure JavaScript implementation.

12 lines (11 loc) 519 B
/** * Japanese text normalization for preProcess: converts Arabic digits to * hiragana so the downstream ja-g2p (romaji-based after anyAscii) can read * them. * * Outputs hiragana in base form without rendaku — ja-g2p's syllable map * lacks the palatal voiced rows (bya/pya/…), so emitting さんびゃく would * produce broken phonemes for the びゃ slot. We accept さんひゃく etc. as * the imperfect-but-tokenizable compromise. */ export declare function expandJapaneseText(text: string): string;