Automating fade-in/fade-out of labeled tracks with Envelope

This could be done with Nyquist, but it will be slow, and heavy on memory usage (not suitable for long tracks).
An alternative is to use SoX for this also.
There is a discussion here that I think will be very useful: Batch add silence and repeat OGG files