Repository navigation
fix(words): match the text's pauses to the voice's silences by position, and warn when the voice ran on - #108
Merged
Merged
Conversation
…on, and warn when the voice ran on
…-gaps # Conflicts: # skills/motion-render/scripts/cli.ts # skills/motion-render/scripts/words.ts # tests/words.test.ts
This was referenced Nov 18, 2026
Merged
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 #71. Part of #87.
Summary
The narration's phrases are now matched to the silences in the voice by position, not by silence length alone. A short silence inside a phrase (a small っ, a breath) and a pause the voice skipped in the same scene no longer push a phrase head off by up to a second.
narratenames a scene whose voice ran on through a pause.Why
charTimessplit the voice at silences of 80 ms or more and joined the shortest gaps until there was one run per phrase. When a っ's closure and a skipped 、 met in one scene, the wrong gaps were joined.How
charTiming(x, text)charTimesis unchanged for its callersranOnLinesnarrateprints awords: the voice of "<id>" ran on through N of M pauses …line for each such sceneTest
tests/words.test.ts, with synthetic speech that has a skipped 、 and a っ-like 0.12 s silence in one scene. Every phrase head is within 50 ms, and the scene counts one pause run on. It failed before (か was 0.52 s late).charTimestests pass unchanged.ranOnLinestest: only the scene that ran on is named.make checkpasses.Not measured here: the TTS scenes from #59, since their recordings are not in the repo. The acceptance item "the #59 figures do not get worse" needs a run on real narration.