
SoX: How to Reverse Audio
Updated
Learn how to reverse an audio file in the terminal using SoX

Before we start, make sure you have SoX installed on your computer and your audio file ready in a folder. On a Mac, you can install it with Homebrew:
brew install sox
Reverse the Audio
First, open your terminal and navigate to the folder with your audio file using cd. To play your audio backwards, run this command:
sox input.wav output.wav reverse
Just remember to replace input.wav with your actual file name and output.wav with the name you want for the new file. The reverse effect flips the audio so it plays from the end to the start.
For short files, this finishes almost instantly, and don't worry if you don't see a success message. SoX has to read the whole file before it can reverse it, so make sure you have enough free disk space for long files. Also, use a different output name, because if you reuse the same name, SoX will wipe out your original file.
To make sure everything worked, run play output.wav to listen to the reversed file right from your terminal.
If you want a reverse reverb effect, where the echo builds up before the sound hits, chain reverse, reverb and reverse like this:
sox input.wav output.wav reverse reverb reverse
