Pause cuts from STT words: a 0.35 s gap rule and the 0.2 s trim floor

Turn STT word times into keep-ranges: cut gaps over 0.35 s, drop slivers under the 0.2 s trim minimum, and price 8 trim jobs at $0.02 each.

4 min readSume
All posts

A pause cut is a list of kept ranges. Walk the speech-to-text words, end a range whenever the gap to the next word is longer than your threshold (0.35 s is a workable start), and send each range to video trim as start and end. The trim API refuses any output shorter than 0.2 s, so drop slivers before you submit, and each surviving range is one $0.02 job.

Instagram describes First Draft as cutting the pauses and trimming your clips with one tap, with everything reversible (read 2026-10-09). Sume's media tools take ranges, so the threshold itself lives in your code, and the numbers below are your choices, not Instagram's.

The rule in code

Words come from video_inspect with transcribe: true, which returns words[] with word, start and end in seconds from the start of the video. Skip any word that has no timing (the schema marks start and end optional). The function below merges words that sit within the gap, then drops ranges under the floor.

def kept_ranges(words, gap=0.35, floor=0.2):
    """words: STT words [{"word", "start", "end"}] in seconds.
    Returns [(start, end)] to keep. Gaps longer than `gap` are cut."""
    timed = [w for w in words if "start" in w and "end" in w]
    ranges, cur = [], None
    for w in timed:
        if cur and w["start"] - cur[1] <= gap:
            cur[1] = w["end"]           # same breath: extend the range
        else:
            if cur:
                ranges.append(cur)
            cur = [w["start"], w["end"]]
    if cur:
        ranges.append(cur)
    # video-trim refuses an output under 0.2 s, so drop slivers here
    return [(round(s, 3), round(e, 3)) for s, e in ranges if e - s >= floor]

def trim_body(video_url, start, end):
    return {"video_url": video_url, "start": start, "end": end}

What it costs on a 42-second clip

Example numbers, not a measurement: assume a 42 s talking clip with 9 gaps over 0.35 s. That gives 10 candidate ranges. Two are lone fragments under 0.2 s and are dropped, which leaves 8 trims. The STT reserve is one minute because a clip under a minute still reserves a full minute when you omit duration_seconds.

Cut-range cost for the example clip (rates read 2026-10-09, arithmetic only)
StepJobsRateTotal
Speech to text on a 42 s clip (reserves 1 minute)1$0.01$0.01
Video trim, one per kept range8$0.02$0.16
Total for the cut ranges$0.17

Limits that shape the rule

These are the documented trim limits that your code should respect before it posts anything.

  • Send an Idempotency-Key per range so a retried batch does not double-bill.
  • Trimmed MP4s are new files; the source stays untouched, so you can rerun with a different gap.
Video trim limits (read 2026-10-09)
LimitValueWhat to do
Output length0.2 s to 900 sDrop ranges under 0.2 s
Source lengthup to 1800 sSplit longer recordings before import
Range fieldsstart plus only one of end or durationSend end, never both
Precisionexact by default, frame-accurateKeep exact so a cut does not start early
Rate$0.02 per job8 ranges = $0.16

Where eight trim jobs are overkill

If all you need is the stitched Reel, a Timeline render can take the same ranges as source_in and duration slots over one source and skip the trim jobs entirely. See the Timeline-only version for the cost comparison.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume