You are hereBlogs / elBoB's blog / Simple Audio Editing with SoX

Simple Audio Editing with SoX


By elBoB - Posted on 23 August 2009

SoX is a free command line tool that enables you to convert audio files. This can be helpful many times - here are some examples.

First get SoX at http://sox.sourceforge.net

Format conversion

sox foo.aiff foo.wav
sox foo.wav foo.raw

Create Stereo file from Mono
sox foo.wav -c 2 foostereo.wav split

Trim files
sox Input.wav Half1.wav trim 0 30:00
sox Input.wav Half2.wav trim 30:00 60:00

Append wav file to another

added:
sox short.wav long.wav longer.wav
might also work
---

sox -V -r 48000 -c 2 -3 1.wav 1.raw
sox -V -r 48000 -c 2 -3 2.wav 2.raw

Windows: copy /b 1.raw + 2.raw 3.raw
Linux & Max: cat 1.raw 2.raw > 3.raw

sox -V -s -3 -r 48000 -c 2 3.raw 3.wav

Explanation:
-s signed, -3 24bit, -r sample rate, -c 2 channels

Extract single channel

Extracts left (l) channel
sox foo.wav -c 1 foomono.wav avg -l

Create downmix
sox foo.wav -c 1 foomono.wav avg

Search

Latest Poll

Will the new AACS licence help to open the BD market for smaller publishers: