Trim from end, and add fade, batch export

Hey there!

I need to take 300 audio files, remove 4/5 seconds from the end (a lot have silence at the end), and then add a 4/5 second fade, and then export - as a batch macros, any ideas? Would be really appreciative!

Thanks!

There’s a plug-in available for trimming silence from the end of a track: https://wiki.audacityteam.org/wiki/Nyquist_Effect_Plug-ins#Trim_Silence
The plug-in can be used in a macro.
For the fade-out, you could make a slightly modified version of the “Fade Ends” macro that is included in Audacity.

Thanks the trim worked a treat!!, i just dont know how to fade out 5 seconds from the end?

See steps 3 and for in the “Fade Ends” macro.
(You will need to increase “End=1” to “End=5”)

Don’t forget to put one of the Export commands at the end of the macro so that it will export the results of the batch processing.

Thanks so much! This is working great! I have 2 processes now,

  1. Trim
    TrimExtend:end-adjust=“-5” error-control=“Show errors” start-adjust=“0” t-units=“seconds”
    FadeOut:Use_Preset=“”
    Select:End=“1” RelativeTo=“SelectionEnd” Start=“0”
    ExportWav:

  2. Then Fade
    Select:Start=“0” End=“1”
    FadeIn:Use_Preset=“”
    Select:End=“5” RelativeTo=“ProjectEnd” Start=“0”
    FadeOut:Use_Preset=“”
    Select:Start=“0” End=“0”
    ExportWav:


    I got over confident snd tried to combine both into one, but it didnt work, any ideas?
    TrimExtend:end-adjust=“-5” error-control=“Show errors” start-adjust=“0” t-units=“seconds”
    FadeOut:Use_Preset=“”
    Select:End=“1” RelativeTo=“SelectionEnd” Start=“0”
    Select:Start=“0” End=“1”
    FadeIn:Use_Preset=“”
    Select:End=“5” RelativeTo=“ProjectEnd” Start=“0”
    FadeOut:Use_Preset=“”
    Select:Start=“0” End=“0”
    ExportWav:

TIA really, i owe you!!

It looks like you got very close.
I don’t have the plug-in installed at the moment so I’ll need to install that first. I’ll get back to you shortly.

Try this:

TrimSilence:min-end-silence="0" min-start-silence="30" threshold="-48"
Select:End="5" RelativeTo="ProjectEnd" Start="0"
FadeOut:Use_Preset="<Current Settings>"
ExportWav:

Note: I’ve set min-start-silence=“30” so that leading silence is NOT trimmed (assuming leading silence of less than 30 seconds). You can change that if you want to trim leading silence.

I’ve just noticed that you are using the “Trim / Extend” plug-in rather than the “Trim Silence” plug-in.
I recommended the latter as it does trimming, but “Trim / Extend” should also work provided that you use the correct settings (I’ve not tested as I installed the other one).

Thanks so much! Really appreciate your help!!