Translation Engine

Auto Spacing for Japanese & Chinese Lyrics

#AutoSpacing#CJK#Japanese#Chinese

Japanese and Chinese don’t put spaces between words. That’s fine for reading, but a karaoke-style player works best when it knows where each word starts and ends, so it can highlight words in time with the music.

Auto Spacing adds those spaces for you.


1. What it does

Auto Spacing looks at a Japanese or Chinese line and puts spaces between the words. For example, 君の声が聞こえる becomes 君の 声が 聞こえる. It keeps the punctuation and updates the pronunciation for those rows too.

2. How to use it

1. Open a song that has lyrics and choose Edit Translation.
2. Spacing fields appear on Japanese (ja) and Chinese (zh...) rows. If a row isn’t detected correctly, set its language tag yourself.
3. Click Auto Spacing.
4. Check the results in the spacing fields, and fix anything by hand.
5. Click Save Changes.

3. How it works out where the spaces go

Here’s what happens, step by step.

The problem. When a Japanese line like 君の声が聞こえる is translated, you get its pronunciation written in English letters, like Kimi no koe ga kikoeru. That already has spaces in it, but it doesn’t say which Japanese characters belong to which word.

The workaround. PlanetMusic works through the line one piece at a time, starting from the end and moving toward the beginning, and works out how each piece sounds. There’s a catch: a character on its own is often pronounced differently than it is inside a sentence. So each piece is always read with the rest of the line around it, and only that one piece’s sound is picked out. For example, it reads the whole line and pulls out just how る sounds in that context.

The matching. Once it knows how every piece sounds in context, it lines those sounds up against the full pronunciation. Wherever a piece ends exactly where a space falls in the pronunciation, a space goes into the original text. This takes a few seconds, which is why Auto Spacing can take longer than translation.

4. Double-check the result

Treat the result as a first draft. Check names, particles, mixed Latin text, and punctuation before you save.


Why a human review still matters

The spacing routine uses transliteration results as a guide, queries the translation service for character groups with their surrounding line as context, and tries to align those readings with the full pronunciation. That is a heuristic alignment, not a dictionary-backed guarantee of correct word segmentation. Names, particles, unusual spellings, mixed scripts, and ambiguous readings can all produce plausible but incorrect breaks.

Run it on the Japanese or Chinese rows that need karaoke word highlighting, then inspect both the spacing and pronunciation fields before saving. Since the routine makes multiple requests per line, long lyrics can take noticeably longer and rely on the translation service being reachable. Manual edits are expected when the inferred boundaries do not match the intended words.

Sponsored

Sponsored Feature

Thank you for supporting PlanetMusic