<aside>
π
Nudge Segment Cuts to Land on Word Boundaries β No More Mid-Word Slices
Video Analysis produces highlight segments with start/end times inferred by an LLM β but those timestamps often fall right in the middle of a spoken word. Snap Segments to Speech fixes that: it reads a word-timed transcript and nudges each segment's start_sec / end_sec to the nearest word edge (within a max distance you set). Feed the refined JSON into Video Trim and clips no longer start or end mid-syllable. A single Advanced control (max snap distance in seconds) keeps the whole thing under your control.
</aside>
What it does
Snap Segments to Speech is a JSON refinement tool that sits between Video Analysis and Video Trim in the highlight pipeline. It takes:
- Segments JSON from Video Analysis (with
start_sec / end_sec per segment)
- Word-timed transcript from an upstream ASR / Speech-to-Text node
β¦and outputs a new segments JSON where each segment's boundaries have been snapped to the closest word edge in the transcript, up to a configurable maximum snap distance. The result: when the refined JSON drives Video Trim downstream, clips start and end on clean word boundaries β no mid-word audio, no half-cut consonants.
Problem it solves
- Prevent mid-word cuts β LLM-inferred segment boundaries are rarely word-aligned; without this step, Video Trim can produce clips that start halfway through a word
- Cleaner clip openings and endings β Trimmed clips sound intentional and complete when boundaries land on real speech events
- Better subtitle sync β Word-aligned boundaries pair cleanly with karaoke subtitles from Video Subtitle (Spoken) (no dangling partial words at clip edges)
- Preserve LLM intent β The tool only moves boundaries by a small tolerance (default 0.5 s); it doesn't rewrite the LLM's segmentation, just polishes the edges
- Deterministic post-processing β Same inputs + same tolerance = same output, so refinements are reproducible
- One-node insertion β Drop it between Video Analysis and Video Trim; no downstream changes needed
- Higher clip quality without more model calls β This is a data-refinement step, not another expensive LLM inference
Input/Output
<aside>
- Input: Segments JSON + word-timed transcript
- Segments JSON (top input, orange port): Highlight-segment metadata from Video Analysis β one entry per segment with fields like
start_sec, end_sec, title, hook, hook_sec, score
- Transcript (bottom input, pink/magenta port): Word-timed transcript from an upstream ASR / Speech-to-Text node β each word carries a timestamp
</aside>
<aside>
- Output: Refined segments JSON
- Format: Same JSON shape as the input segments β one entry per segment, all original fields preserved
- What changes: Only
start_sec and end_sec are modified β each is nudged to the nearest word edge within the max-distance tolerance
- What stays the same: All other fields (
title, hook, hook_sec, score, etc.) pass through unchanged
- Downstream: Feed directly into Video Trim β the physical cutting step now cuts on word boundaries
</aside>
Configuration Options
Advanced Options