
SoX: How to Change Bit Depth
Updated
Learn how to change the bit depth of an audio file 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
Change the Bit Depth
First, open your terminal and navigate to the folder with your audio file using cd. To see the current bit depth, run soxi -b input.wav. To bring a 24-bit file down to 16-bit, run this command:
sox input.wav -b 16 output.wav
Just remember to replace input.wav with your actual file name and output.wav with the name you want for the new file. The -b 16 flag sets the bit depth of the output. You can swap 16 for 8, 24 or 32. Place it right before the output file name, because flags before the input file describe the input, while flags before the output file define the output.
For most files, this finishes almost instantly, and don't worry if you don't see a success message. When you reduce the bit depth, SoX adds dither automatically, so the result still sounds clean.
To make sure everything worked, run soxi -b output.wav. It should print 16.
If you also want to change the sample rate, just add -r and the new rate in the same command:
sox input.wav -b 16 -r 44100 output.wav
