SoX: How to Convert Stereo to Mono

Updated

Learn how to convert stereo audio to mono in the terminal using SoX

SoX: How to Convert Stereo to Mono

Before we start, make sure you have SoX installed on your computer and your stereo audio file ready in a folder. On a Mac, you can install it with Homebrew:

brew install sox

Convert to Mono

First, open your terminal and navigate to the folder with your audio file using cd. To see how many channels it has, run soxi -c input.wav. A 2 means stereo. To convert it to mono, run this command:

sox input.wav -c 1 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 -c 1 flag sets the output to a single channel, and SoX averages the left and right channels together.

For most files, this finishes almost instantly, and don't worry if you don't see a success message. Just make sure your output name is different from your input name, because if you reuse the same name, SoX will wipe out your original file.

To make sure everything worked, run soxi -c output.wav. It should print 1.

undefined

If you only want one side of the stereo file, use the remix effect instead. remix 1 keeps just the left channel, and remix 2 keeps just the right channel:

sox input.wav output.wav remix 1