Repository navigation
Japanese: decimals, line breaks and numbers in the speech check - #28
Merged
Merged
Conversation
misaki reads 365.2422 as 365, a pause and 2422. Japanese reads the digits after the point one by one, so explainroo now sends 365点二四二二. Subtitle lines, cue breaks and burned-in caption phrases no longer start with a Japanese particle or ending (hiragana after a word) or a Chinese particle such as 的 or 吗, unless nothing else fits.
vincentsch
force-pushed
the
cjk-polish
branch
from
October 13, 2026 21:31
f43f5b1 to
bf081b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes found while making a Japanese example video.
Decimals. misaki, Kokoro's Japanese reader, reads
365.2422as "365", a pause, and then "two thousand four hundred twenty-two". explainroo now sends365点二四二二instead, which reads the digits after the point one by one. Scripts can keep plain digits, with no per-digit overrides.Line breaks. Subtitle lines, cue breaks and burned-in caption phrases no longer start with:
The rule only applies when the line has a better place to break. Content words written in hiragana, such as うるう年, can still start a line.
Before → after, from the example video:
地球の動きとカレンダー/にズレがたまります。→地球の動きとカレンダーに/ズレがたまります。そこで、基本は4/年ごとに1日を足します。→そこで、基本は4年ごとに/1日を足します。Numbers in the speech check. UniDic leaves digits unread, so a correctly spoken "365.2422" failed when Whisper wrote
365.24に2. Digits now get their Japanese reading on both sides: サンビャクロクジューゴ, and digit by digit after a decimal point.AGENTS.md. Speaking rates for Japanese (about 270 characters a minute) and Chinese (about 200). Two readings the Japanese reader gets wrong, with their fix. Notes that
check,still,sheet,renderandpreviewalso make missing narration, and that pace is approximate.Tested with
npm test(193 pass), new unit tests for each rule, and the Japanese example re-voiced and rendered: 95–100% per scene, 99% in the final mix.