How to add silence at the end of a clip


I would like to add 3 seconds of silence to a batch of files (about 500). The Nyquist Prompt seems to be the solution. In there are some solutions for the code but I think it should be more simple.
Can someone help me with this script?



Is there any reason you don’t use Chains (Audacity Batch) to load a sound file, send the cursor to the end and paste a pre-baked 3-second silent sound file?

Export and Repeat.

If that doesn’t work, Generate and make sure the Silent tool is set to 3 seconds so you don’t have to program it.

I don’t know that you need full-on software development and debugging for this.


Free software called SoX will do that.
[ IIRC the command is “concatenate”* to add two files : one file from your batch and a silent audio file 3 seconds long ]

[ * alternatively use pad ]

There’s already a plug-in that can be used in Chains for adding silence at the end (and/or beginning) of clips.
See the “Trim/Extend” plug-in here:

Thank you all! I’ll try all solutions and report back. As you can imagine, batch processing (and ways to automate it) is determinant with large amounts of files. I’ll come back detailing which method was the best. I appreciate your insights. Cheers!