← All tools
Trim audio
Audioaudio.trim
in: audioout: audio
Extract a time range from an audio file.
Pricing
- Price
- 6.25 cr / second
Prices in credits (1 credit = $0.01).
Trim Audio
Extract a specific time range from an audio file, discarding everything outside it.
When to use
- Create a clip — isolate a highlight or excerpt from a long recording.
- Remove silence — cut leading/trailing silence from a podcast or voiceover.
- Prepare for concatenation — trim individual segments before joining with
audio.concat.
Inputs & outputs
| Input modality | Audio file (URL) |
| Output modality | Audio file (GCS URL) |
| Max input duration | 3 hours |
| Max input size | 2 GB |
Parameters
| Param | Required | Description |
|---|---|---|
start | yes | Start time in seconds (non-negative). 0 = beginning of file. |
end | yes | End time in seconds (positive, must be > start). |
Examples
Extract the first 60 seconds
{
"type": "audio.trim",
"input": { "audio_url": "gs://infery-prod-media/example/podcast.mp3" },
"params": { "start": 0, "end": 60 }
}
Extract a mid-section highlight (90–150 s)
{
"type": "audio.trim",
"input": { "audio_url": "gs://infery-prod-media/example/podcast.mp3" },
"params": { "start": 90, "end": 150 }
}
Related capabilities
audio.transcode— re-encode the trimmed output to a different formataudio.concat— join multiple trimmed segments end-to-endaudio.pipeline— combine trim with other audio ops in a single executionvideo.trim— equivalent operation for video files
Examples
First 60 seconds
{
"start": 0,
"end": 60
}