Split audio into segments by timestamps: url and ranges

Sume Timeline audio split needs a top-level url and 1 to 20 ranges. A range with end at or before start is refused; each segment gets its own audio_url.

4 min readSume
All posts

Splitting audio with Sume needs two things: a top-level url and ranges[] of 1 to 20 entries, each { start, end? }. Miss either and the request fails as audio_split_requires_url or audio_split_requires_ranges. A range whose end is at or before start fails as audio_range_end_before_start.

This is from the Timeline audio docs, read 2026-10-01. HeyGen's Speech Cleanup post removes pauses and retakes from a recording; this route cuts at timestamps you supply.

What are the split rules?

Omit end and the range runs to the end of the file. Ranges may overlap. A parts field belongs to the other operation and is refused as audio_split_takes_no_parts; an off-host or dead URL returns unsupported_media_source or source_not_found.

Range cases against the Timeline audio docs, read 2026-10-01.
`ranges` entryResult
{ "start": 0, "end": 12.4 }Accepted
{ "start": 12.4 }Accepted: runs to the end of the file
{ "start": 5, "end": 5 }Refused: audio_range_end_before_start
{ "start": 9, "end": 3 }Refused: audio_range_end_before_start

What does a valid request look like?

Three ranges that tile the file, with the last one open-ended.

curl -X POST https://api.sume.com/v1/timeline-1.0/audio \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: audio-split-001" \
  -d '{
    "operation": "split",
    "url": "https://media.sume.com/artifacts/artf_demo/spine.wav",
    "ranges": [{ "start": 0, "end": 8 }, { "start": 8, "end": 19.5 }, { "start": 19.5 }]
  }'

What does each range give me?

A timeline_audio result whose segments[] each carry their own audio_url, one per range, in request order. The file format is wav unless you set output.format to mp3, which re-adds priming padding at every edge.

How long can the pieces be?

Produced audio is capped at 1800 seconds. With 20 ranges allowed and overlap permitted, the cap is the limit to watch if you ask for many long, overlapping ranges. For a plainer walkthrough, see split an audio file into parts.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume