Basics

Extract part of a wave

# offset 2 seconds, length 0.195 seconds
sox in.mp3 out.mp3 trim 2 0.195

Fix broken waves

sox --ignore-length corrupted.wav fixed.wav

pad

# add 2 seconds of silence at the begining and 3 seconds of silence
# at the end.
sox in.wav out.wav pad 2 3

raw

sox -t raw -r 16000 -e signed -b 16 -c 1 test.raw -r 48000 out.wav

Generate

sox -r 16000 -n -b 16 -c 1 a.wav synth 10 sin 1000

remix

Split multi-channel wave to single channels.

sox stereo_inputfile.wav leftchannel.wav remix 1
sox stereo_inputfile.wav rightchannel.wav remix 2