Trimming TTS Silence: -20 dB Erased a 27-Second Take, -50 dB Cut 19 to 502 ms
If your local AI narration already fits a 30-second slot, trimming its edges is cleanup, not a way to save time. On four takes of one 73-word script, trimming the start and end at -50 dB removed between 19.3 and 502.3 milliseconds. The same command at -20 dB removed about nine seconds from two takes and left a third with no audio at all, while FFmpeg still exited successfully.
These are measured sample counts from our own files. We did not listen to the results, so the numbers show what was removed. They do not show whether a trimmed take sounds right.
The four takes and the test
All four are existing synthetic narrations of the same script, made locally with VoxCPM2 in October 2026. Takes A and B were generated on a CPU with a synthetic reference clip from an earlier test of ours. Takes C and D were generated on Apple's MPS backend from a voice description, with no reference clip. All are mono, 48 kHz, 16-bit WAV. No new voice was generated, and the audio is not published with this article.
On November 5, 2026, we ran each take once through silenceremove in FFmpeg 9.0.1 at five thresholds. The filter ran with its default RMS detection and 20 ms window, once forward and once on the reversed audio so it could cut both ends. We then decoded every output and located it inside the original sample by sample, which gave the exact amount cut from each end.
What each threshold removed
| Threshold | Take A (22.080 s) | Take B (21.440 s) | Take C (22.880 s) | Take D (27.200 s) |
|---|---|---|---|---|
| -60 dB | 15.7 ms | 23.6 ms | 304.3 ms | 187.1 ms |
| -50 dB | 19.3 ms | 31.7 ms | 502.3 ms | 303.2 ms |
| -40 dB | 62.6 ms | 165.3 ms | 526.4 ms | 452.3 ms |
| -30 dB | 267.6 ms | 480.3 ms | 680.6 ms | 798.4 ms |
| -20 dB | 8.868 s | 9.186 s | 741.8 ms | all 27.200 s (empty file) |
The -20 dB row is the warning. In takes A and B, no 20 ms window reached that level until about eight seconds in, so everything before that point counted as silence. Take A's output began partway through a sentence, and our transcript of it opened with "pair", the end of "compare". Take D's loudest 20 ms window reached only -21.74 dB, so all 27.2 seconds were removed. FFmpeg returned exit code 0 and wrote a file with no audio frames. A script that checks only the exit code would treat that as a success.
Take C lost only 741.8 ms at the same setting because it is much louder. Its mean level measured -19.1 dB, against -30.1, -30.1 and -32.5 dB for A, B and D. A fixed threshold therefore means something different on each file, even when every file comes from the same model and script.
What -50 dB cut from each end
| Take | Original | Cut from start at -50 dB | Cut from end at -50 dB | Result |
|---|---|---|---|---|
| A | 22.080 s | 19.3 ms | 0.0 ms | 22.061 s |
| B | 21.440 s | 7.7 ms | 24.0 ms | 21.408 s |
| C | 22.880 s | 314.9 ms | 187.4 ms | 22.378 s |
| D | 27.200 s | 35.7 ms | 267.5 ms | 26.897 s |
Only take C lost more than 100 ms from its start. Take A lost nothing from its end at this setting. All four already fit 30 seconds, at 21.44 to 27.20 seconds before any edit. On this evidence, edge trimming tidies the start and end of a take but will not rescue a script that runs long.
The start and end cuts also affect captions differently. Captions made before trimming need to move earlier by the amount cut from the start, which would be 314.9 ms on take C. Cutting the end moves nothing. That is arithmetic from the cut positions; we did not re-time a caption file here.
Where the transcript changed, and why it proves little
We ran a local Whisper large-v3-turbo transcript on the originals and on each output. All four originals matched the script word for word. With no silence kept, the final word "it" dropped from the transcript of takes A and B at -30 dB, and take D's "upload it" became "update". Take C lost "it" only at -20 dB.
That pattern suggests the ending was being cut into, but it is not proof. At -50 dB, the word "if" also changed in the transcripts of takes A and D, late in the script, in a part of the audio this edge trim never touched. A transcript can change for reasons other than damage to that word, so a clean one does not clear a trim and a changed one does not convict it. Listen to the first and last words yourself.
Removing pauses is a different edit
Some silence-removal commands add stop_periods=-1. FFmpeg's documentation says a negative value removes silence from the middle of the audio. That changes pacing rather than tidying the edges, and the size of the change depends on the stop duration. These figures include the start trim:
| Take | Original | -40 dB, pauses of 300 ms or more | -40 dB, pauses of 100 ms or more |
|---|---|---|---|
| A | 22.080 s | 21.880 s | 20.114 s |
| B | 21.440 s | 21.332 s | 20.505 s |
| C | 22.880 s | 22.266 s | 20.995 s |
| D | 27.200 s | 22.479 s | 19.255 s |
Take D lost 7.945 seconds at the 100 ms setting, or 29% of its length. That setting also narrowed the gap between the longest and shortest takes from 5.76 seconds to 1.74 seconds, so much of the difference between these takes was audio below this threshold. Transcripts of all eight outputs still matched the script, but that says nothing about whether the rhythm still works, because a transcript does not measure rhythm. Any captions would need rebuilding after this edit.
Keeping 50 ms did not give us a plain crop
We repeated the edge trims with start_silence=0.050, expecting the original samples plus a short margin. The outputs did not line up that way. At -50 and -40 dB, some were two samples longer than the source (take A at -50 dB: 1,059,842 frames against 1,059,840). Across the -50, -40 and -30 dB outputs we compared, 705 to 4,746 samples differed from the matching part of the original, with differences near the start or end. We did not investigate the cause. The margin did keep "it" in take A's transcript at -30 dB but not in take B's. If you need an exact margin, cut at a known sample position with atrim and verify the result.
Try it on your own take
Use a voice file you own. -n keeps FFmpeg from overwriting an existing output.
ffmpeg -nostdin -i voice.wav -af volumedetect -f null -
ffmpeg -nostdin -n -i voice.wav -af "silenceremove=start_periods=1:start_threshold=-50dB:start_silence=0,areverse,silenceremove=start_periods=1:start_threshold=-50dB:start_silence=0,areverse" -c:a pcm_f32le trimmed.wav
ffprobe -v error -show_entries stream=duration_ts -of csv=p=0 trimmed.wav
The first command prints the file's mean and peak level. The last prints the output's length in samples. On our empty file, a 92-byte WAV, it printed 1, so treat a value near zero as a failure even when the exit code is 0.
Which setting should you use?
- The narration already fits: try -50 or -60 dB on the edges, then listen to the first and last words. In our takes, -50 dB removed passages peaking as high as -29.4 dBFS, so even this setting is not guaranteed to cut only silence.
- Your files vary in loudness: measure each one first. We would not reuse a fixed -30 or -20 dB setting across takes, given the results above.
- You need several seconds back: edge trimming will not provide them. Removing pauses or fitting the voiceover to an exact length are separate edits, and both call for a listen and new caption timing.
Limits
This was one script, one first word ("Before"), four takes, one voice model and one run per setting. A script that starts or ends on a softer sound could behave differently. We did not test peak detection, other window sizes, a hosted voice service or a loudness-normalized version of these takes. The result does not establish a universal threshold or an audible winner.
Two community reports describe related issues, each from one setup. A 2020 ffmpeg-user message reports that moving from -38 to -37 dB cut 36 ms of a first sound. A DEV post describes one TTS service padding its clips with silence that was not always digital zero and often contained low-amplitude noise.
Sources checked
The FFmpeg silenceremove documentation, read on November 5, 2026, explains the options used here. All numerical results above come from our own local exports.
Prepared with AI assistance from owned synthetic narration and local command logs. No sponsor or affiliate links. Listening was not part of this experiment; no personal listening or customer experience is claimed.
Comments
Post a Comment