DocsGuides
Silence detection and removal
Detect quiet ranges as JSON or remove their interiors from a video or audio file.
POST /v1/detect_silence writes a JSON output with the source duration, verified audio coverage,
normalized options and quiet ranges on the source clock.
curl "$VIDEXO_API_URL/v1/detect_silence" \
-H "Authorization: Bearer $VIDEXO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "https://example.com/recording.mp4",
"thresholdDb": -40,
"minSilenceSeconds": 0.5
}'Copy failed. The text is selected; copy it with your keyboard.
const response = await fetch(`${process.env.VIDEXO_API_URL}/v1/detect_silence`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VIDEXO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input": "https://example.com/recording.mp4",
"thresholdDb": -40,
"minSilenceSeconds": 0.5
}),
});
const job = await response.json();Copy failed. The text is selected; copy it with your keyboard.
POST /v1/remove_silence removes quiet interiors and keeps padding beside the remaining sound.
It writes H.264/AAC MP4 by default. Set type: "audio" for an AAC M4A file.
curl "$VIDEXO_API_URL/v1/remove_silence" \
-H "Authorization: Bearer $VIDEXO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "https://example.com/recording.mp4",
"speechPaddingSeconds": 0.15
}'Copy failed. The text is selected; copy it with your keyboard.
const response = await fetch(`${process.env.VIDEXO_API_URL}/v1/remove_silence`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VIDEXO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input": "https://example.com/recording.mp4",
"speechPaddingSeconds": 0.15
}),
});
const job = await response.json();Copy failed. The text is selected; copy it with your keyboard.
| Option | Default | Range |
|---|---|---|
thresholdDb | -40 dB | -60 to -20 dB |
minSilenceSeconds | 0.5 s | 0.1 to 10 s |
speechPaddingSeconds | 0.15 s | 0.05 to 1 s |
This is amplitude detection. Quiet speech can fall below the threshold, and padding does not establish word alignment. Choose settings for your recording and listen to the result. Both channels are analysed together. This does not classify speech with a voice activity model.
In a JSON job, put silence: { "mode": "detect" } on a metadata output, or
silence: { "mode": "remove" } on a video or audio output, with these controls in the same
object. Use a complete input; presets, trim, concat and other transforms are refused on that
output. The technical source ceiling is two hours, further limited by your plan's job deadline.
No-audio, all-silent removal, incompatible clocks or excessive intervals fail with
processing_failed and reason silence_fit. No ranges are dropped to fit a limit.
Detection consumes one processing pass; removal consumes analysis and render passes. Existing video, audio, metadata, data and excess-processing rates apply. Both passes and clock checks count in actual processing time, including work before a failure or cancellation. Detection is not covered by ordinary metadata's zero-processing exemption. The Playground leaves unmeasured total time, size and credits unknown, and shows the initial credit hold separately. Use HTTP for these additions until a package containing the new named SDK methods is published.