Repository navigation
fix(skills): assemble voice clips at the audio file's duration, not the frame's - #5720
Closed
dennisofficial wants to merge 1 commit into
Closed
dennisofficial wants to merge 1 commit into
dennisofficial wants to merge 1 commit into
Conversation
…he frame's assemble-index.mjs mounted each per-frame voice <audio> with data-duration=<frame duration>, but the storyboard frame duration covers the frame's whole beat including inter-frame padding. A clip window longer than the media renders the speech and then pads the remainder with silence, producing dead air between frames. Measure the file with ffprobe (the same invocation ensureBgmCovers already uses) and emit that as data-duration; fall back to the frame duration with an anomaly note when the probe is unavailable or unreadable, so assembly still never hard-fails on missing audio tooling. BGM and SFX clip kinds were checked and do not share the bug: BGM is loop-extended to TOTAL before mounting, and SFX carries its own cue duration_s.
Collaborator
|
Reviewed at Thanks for tracking this down carefully, especially for checking that BGM and SFX don't share the problem. Need: no, #5651 removed the code · Size: ok · Reuse: n/a · Simpler: n/a — Rames |
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.
Problem
skills/faceless-explainer/scripts/assemble-index.mjsmounted each per-frame voice<audio>clip withdata-duration="<frame duration>". The storyboard frame duration covers the frame's whole beat — content plus inter-frame padding — so the assembled voice clip's window was longer than the audio file. The runtime treats adata-durationlonger than the media as an extended clip window, rendering the speech and then padding the remainder with silence: dead air before the next frame's line.Reproduced in a real assembled project: resizing a voice clip in the Studio editor snapped it shorter than its placed duration, revealing the window had never matched the media. After hand-correcting the assembled
index.html, each voice clip'sdata-durationequals its.wavmedia length (e.g.6.91for a 6.912s file,15.45for 15.445s).Fix
Measure the voice file with
ffprobe— the same invocationensureBgmCoversalready uses for BGM — and emit the measured duration as the clip'sdata-duration. When the probe is unavailable or unreadable, assembly falls back to the frame duration with an anomaly note rather than hard-failing on missing audio tooling, matching the script's existing degrade-gracefully stance.The other clip kinds were checked and do not share the bug:
ensureBgmCovers) before being mounted atdata-duration=TOTAL— deliberate.cue.duration_sauthored inaudio_meta.json, never the frame duration.if (name.toLowerCase() === "audio") return tag;).Verification
node --test skills/faceless-explainer/scripts/assemble-index.test.mjs— 6/6 pass: the 4 existing tests plus two new regression tests:data-duration≈1.5, not 3;could not probeanomaly.bunx oxfmt --checkandbunx oxlintclean on both changed files.skills-manifest.jsonregenerated withbun run --cwd packages/cli gen:skills-manifest(only thefaceless-explainerhash drifted, as expected).