LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

sox

Universal command-line audio processor

TLDR

Convert audio format
$ sox [input.wav] [output.mp3]
copy
Concatenate files
$ sox [file1.wav] [file2.wav] [output.wav]
copy
Change sample rate
$ sox [input.wav] -r [44100] [output.wav]
copy
Mix to mono
$ sox [input.wav] [output.wav] channels 1
copy
Add reverb
$ sox [input.wav] [output.wav] reverb
copy
Trim audio
$ sox [input.wav] [output.wav] trim [0] [10]
copy
Normalize volume
$ sox [input.wav] [output.wav] norm
copy
Record audio
$ sox -d [output.wav]
copy

SYNOPSIS

sox [options] infiles outfile [effects...]

DESCRIPTION

sox (Sound eXchange) is a command-line audio processing tool. It converts between formats, applies effects, and can record and play audio.The tool supports many audio formats and provides extensive processing capabilities including filtering, mixing, and format conversion.

PARAMETERS

-r rate

Sample rate.
-c channels
Number of channels.
-b bits
Sample size in bits.
-e encoding
Sample encoding.
-t type
File type.
-v factor
Volume adjustment.
-d
Default audio device.
--combine type
Combine method (concatenate, merge, mix).

EFFECTS

trim: Cut portionfade: Fade in/outreverb: Add reverbnorm: Normalizespeed: Change speedpitch: Shift pitchequalizer: EQ adjustmentcompand: Compression

CAVEATS

Some formats need external libraries. Complex effects chains can be slow. Quality depends on parameters. Some effects modify duration.

HISTORY

SoX was started by Lance Norskog in 1991 and has been developed by many contributors. It became the Swiss Army knife of audio processing on Unix systems.

SEE ALSO

ffmpeg(1), lame(1), flac(1), aplay(1)

Copied to clipboard
Kai