Follow Brian Li (@DecryptoBL) on Twitter.
Follow Brian Li (@bwhli) on Instagram.

How to Batch Normalize Audio on MacOS with SoX

April 22, 2017

Learn how to use the SoX CLI to batch normalize audio on MacOS.


In this tutorial, you’ll learn how to batch normalize audio on MacOS with the cross-platform command line utility SoX (Sound Exchange).

Download & Install SoX

To install SoX, you’ll first need to download and install a package manager for MacOS called Homebrew.

Navigate to ~/Applications/Utilities, and click on the Terminal app. Copy and paste the snippet below into the Terminal window.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)

Press Enter to start the installation process.

Press Enter again to continue the installation process. The script will ask for your administrator password to complete the installation.

https://upscri.be/b1cf8f

When the installation is finished, use the snippet below to install SoX.

brew install sox

Next, use Finder to create a folder on your desktop, and place the audio files you want to normalize into the folder. I’ve named my folder 2convert. Create a second folder in the 2convert folder called converted.

Navigate back to Terminal, and use the snippet below to navigate to your newly created 2convert folder.

cd ~/Desktop/2convert

Finally, use the following snippet to normalize all audio files in the 2convert folder to -0.1dB.

for file in *.wav; do sox $file — norm=-0.1 converted/$(basename $file) -V; done

The normalized files can be found in the converted folder.


Hi, I’m Brian and I’m an electronic music designer for Broadway shows and other theatrical productions around the world. If you enjoyed this article, click the ? below to let the world know.

Be sure to follow us on Facebook and Twitter!


Questions?

Find me on Twitter, or send me an email.