Misaki is an experimental G2P engine designed to power future versions of Kokoro models.

This English-only preview is primarily intended for researchers and linguists. It may be deeply uninteresting to most people.

Examples

American: [Misaki](/misˈɑki/) is an experimental G2P engine designed to power future versions of [Kokoro](/kˈOkəɹO/) models.

British: [Misaki](/misˈɑːki/) is an experimental G2P engine designed to power future versions of [Kokoro](/kˈQkəɹQ/) models.

But I am the Chosen One. But I [am](+1) the Chosen [One](-1). But I [am](+2) the Chosen [One](-2).

1002. [1002](#a#). [1002](#an#). [1002](#a&#). 2025. 2,025. $45.67 billion trillion.

Token-Level Trace

# 1. Text. Can be useful for aligning text to phonemes, e.g. highlighting text during audio playback.

# 2. Tag. See a full list of tags from spaCy:
# https://github.com/explosion/spaCy/blob/master/spacy/glossary.py

# 3. Whitespace. Whether or not a token has trailing whitespace (string => bool for this demo).
whitespace = True if whitespace else False

# 4. Phonemes. For this demo, the question mark means UNK, the ninja emoji means empty string.
phonemes = '❓' if phonemes is None else ('🥷' if phonemes == '' else phonemes)

# 5. Rating. Star rating for the estimated quality of this token's phonemes.
ratings = dict(
user_override = '💎(5/5)',
gold = '🏆(4/5)',
silver = '🥈(3/5)',
bronze = '🥉(2/5)',
unk = '❓(UNK)',
)

Notes

  • For English, Misaki uses a gold dictionary with 80k words and a similarly sized silver dictionary.
  • There are separate dictionaries for American & British English.
  • Users can override the dictionary and/or individual tokens with custom pronunciations.
  • espeak-ng is used as the fallback for OOD words, and the token is rated "bronze" in this case.
  • Raw token objects are returned, with phonemes aligned at the per-token level.
  • UNKs are easy to detect when token.phonemes is None.
  • The entire implementation of Misaki (English) is <1000 lines of Python, excluding dictionary files.
  • POS disambiguation should be live, e.g. to wound someone vs wound up.
  • use_spacy_transformer should deliver more reliable POS tags.
  • Non-POS-based disambiguation, like graph axes vs throwing axes, is still a TODO.