How to automate the replacement of pauses with noise with "silence" of my own?

There usually has to be a crossfade of ~10ms to avoid clicks where the new audio is pasted in.