Skip to content

fix(cli): preserve media after the last transcript word - #5325

Open
user-github-me wants to merge 1 commit into
heygen-com:mainfrom
user-github-me:fix/transcript-cut-source-duration
Open

user-github-me wants to merge 1 commit into
heygen-com:mainfrom
user-github-me:fix/transcript-cut-source-duration

Conversation

@user-github-me

Copy link
Copy Markdown
Contributor

What

Preserve source media after the last transcript word when applying transcript cuts.

Why

On current main, removing a 0.5-second filler from a six-second source whose last word ends at four seconds produces only 3.5 seconds: the unrequested two-second outro is discarded. An explicit --keep 4-6 also fails with an empty cut list even though those seconds exist in the source.

Related work

#1973 introduced the transcript-cut workflow, and #4179 addressed audio splices and codec priming. This corrects the duration supplied to the existing cut-list compiler. Current issues and all 137 open PR file inventories were checked; no competing transcript-cut implementation was found.

How

Probe the input before compiling the cuts and pass its duration through the compiler's existing option. A --plan with --input uses the same source duration as encoding, so its ranges match the output. Transcript-only planning remains available without media tools and uses the last word's end; help and operations documentation explain the distinction.

Test plan

  • Two command regressions fail on main with 15 controls passing: filler removal preserves the source tail, and an explicit keep range can select footage after the last word.
  • All 17 focused cut-list, audio-splice and command tests pass. The new tests verify the plan, exact decoded PCM duration and audible output tail.
  • Source and rebuilt packaged commands tested on a real six-second, 24fps video with a distinct two-second outro: removing the filler yields 132 frames / 5.5 seconds, and keeping the outro yields 48 frames / two seconds. Both retain the actual outro frame.
  • Full CI skills discovery: 100 files, 878 passed, two skipped, zero failures, both in the workspace and in a clean archive without node_modules. Standalone import-boundary tests also pass.
  • Fresh full workspace build, CLI rebuild, root lint, changed-file formatting/oxlint, test reachability and normal commit hooks pass.
  • Fallow, comment-citation and comment-share checks pass; the generated skills manifest is in sync.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant