Cut a talking video at its pauses: video_inspect silence_split_seconds

video_inspect with transcribe true returns sentence segments; silence_split_seconds (0.2 to 3) sets how long a pause starts a new one. Find cut points.

5 min readSume
All posts

Send transcribe: true with segmentation: {mode: "sentence", silence_split_seconds: 1.0} to POST /v1/video-inspect. The transcript comes back as sentence segments[] with no gaps, and a pause at least as long as silence_split_seconds (allowed range 0.2 to 3) starts a new segment. Those segment start times are your cut points for a talking video.

The request

The clip must be a media.sume.com URL that your workspace owns; import it first if it is not. Send frames: false if you only want the transcript, since the stills are the part you do not need.

curl -X POST https://api.sume.com/v1/video-inspect \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: inspect-pauses-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4",
    "frames": false,
    "transcribe": true,
    "language_code": "en",
    "duration_seconds": 90,
    "segmentation": { "mode": "sentence", "silence_split_seconds": 1.0 }
  }'

How the pause value changes the segments

A short value splits at brief breaths, giving many short segments. A long value splits only at real stops, giving fewer long ones. Start at 1 second for a talk and move it by ear against the transcript. The range is 0.2 to 3 seconds; a value outside it is rejected.

The segments have no gaps between them, in the shape of caption lines. Each starts where the last one ends, so the cut points tile the clip.

What it costs

The transcript adds Sume STT at $0.01 per audio minute to the inspect. Send duration_seconds (1 to 600) with a value near the real length; without it, Sume reserves one minute. The inspect also reserves its own compute, and the capture is never more than the hold.

If you send language_code, segmentation or duration_seconds without transcribe: true, the API returns 400 video_inspect_transcribe_required.

Silent clips

A clip with no audio track fails with inspect_source_has_no_audio. Check probe.has_audio first with a frames: false inspect, as in the has_audio check. For clips longer than 600 seconds, extract the audio and split it before transcribing.

The default mode is sync and waits up to 30 seconds. If it returns 202, poll the job and do not resubmit.

From segments to cuts

With the segment starts in hand, trim each piece with the video trim route or place them in a Timeline with source_in. Keep the segment text beside each cut so you can caption or search it later. A pause-based cut is a good first pass for a long take; check the first and last words of each piece by ear before publishing.

A cut at a pause lands between sentences, so the clip does not start mid-word. That is the main reason to prefer it over cutting at fixed intervals.

Related posts

More in Media tools

All Media tools posts

Written by Sume