How to remove all gaps between clips in one track?[SOLVED]

Audacity 2.0.3 on WinVIsta.

I have a track with many clips which are separated from each other a few seconds. So the track is full of empty gaps.
Is there a way to remove all those gaps automatically?

There is the option “Edit > CLip boundaries > Join”, but that just replaces the gaps with silent audio.

I could just move each clip manually to the left till it touches the previous one, but that is so tedious when they are so many.

Effect > Truncate Silence….

Audacity 2.0.3 is now old. I recommend you update to the current 2.0.6 here:

If you stay with 2.0.3, Truncate Silence has a different, harder to understand interface.


But the “Truncate Silence” tool remove silent audio.
What I meant is to remove gaps between clips, like shown in the attached image. That is, remove the parts where their is no audio.
audacity clip gaps.png

You did not say the clips have silent audio.

If that silence is absolute silence I can’t think of any automatic way to do what you want. The gaps are functionally equivalent to silence.

If the silence is low level audio, then try setting the “Detect Silence” level in Truncate Silence to -80 dB. If that has no effect, select over the low level audio and Normalize it to -79 dB then repeat Truncate Silence at -80 dB.


That will work in most cases where the “silence” is not “absolutely” silent.

It’s quite likely that won’t work correctly.

Normalizing sets the “peak level” (the level of the highest or lowest peak) to the target level.
If the track is absolutely silent, Normalizing will have no effect.
If the track is “extremely low level” (but not “absolute” silence), then it will be amplified so that the largest peak in the selection becomes -79 dB, but the rest of the selection will be below -79 dB, so quite likely to be below -80 dB.

IF the noise level is sufficiently uniform, then there will be enough peaks between -79 dB and -80 dB for Truncate Silence to work as expected, but it is more likely that too much audio will be below -80 dB, so too much will be removed by Truncate Silence.

What is the job? Why do you have a load of silent audio clips and why do you need to remove the gaps between? That does not look like a normal audio editing job, so what are you doing? We may be able to think of a suitable workaround if we understand what the job is.

True, but I was guessing the “silence” could be dither noise, in which case truncating appears to remove only the white space.

The use case is very unusual if there are large numbers of absolutely silent clips.


Yes, it depends on the type of noise present (if any).
Yes it’s very unusual, so I think we need to know more about why that is - what the job is.

I was still trying to do it with version 2.0.3 and it didn’t work. So I updated to 2.0.6 and now it does remove the gaps selecting -80 dB.
The audio clips are not silent, just very dim.

Thanks for your help.