Skip to main content

Overview

Chinese phoneme control uses pinyin with tone numbers, also known as tone3 pinyin. Wrap one syllable in each <|phoneme_start|> and <|phoneme_end|> tag.
This format is especially useful for polyphonic characters, names, and domain-specific terms where the default reading may be ambiguous.

Tone Numbers

Put the tone number at the end of each pinyin syllable: Use lowercase pinyin and keep punctuation outside the phoneme tag.

Multi-character Words

For a multi-character word, place adjacent phoneme tags in the same order as the original characters:
You can also tag only the ambiguous character and leave the rest of the sentence unchanged:

Polyphonic Characters

For polyphonic characters, choose the pinyin that matches the phrase meaning:

Generate Pinyin

The training pipeline uses the pypinyin dictionary and converts entries to tone3 pinyin. The helper below mirrors that behavior for single characters:
Phrase-level words can require a phrase dictionary or manual selection. For example, should be chong2 in 重庆 but zhong4 in 重要.

Practical Tips

  • Use one phoneme tag per Chinese character or syllable.
  • Keep Chinese punctuation, brackets, and spaces outside the tag.
  • Choose readings manually for names and polyphonic characters.
  • Use ma5-style tone 5 when you need to mark a neutral tone explicitly.