# SoX

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/SoX
> Markdown URL: https://mediated.wiki/source/SoX.md
> Source: https://en.wikipedia.org/wiki/SoX
> Source revision: 1355634597
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

For other uses, see [Sox (disambiguation)](/source/Sox_(disambiguation)).

**Sound eXchange** (**SoX**) is a [cross-platform](/source/Cross-platform) [audio editing software](/source/Audio_editing_software). It has a [command-line interface](/source/Command-line_interface), and is written in standard [C](/source/C_(programming_language)). It is [free software](/source/Free_software), licensed under [GPL-2.0-or-later](/source/GNU_General_Public_License), with libsox licensed under [LGPL-2.1-or-later](/source/GNU_Lesser_General_Public_License), and distributed by Chris Bagwell through [SourceForge](/source/SourceForge).[1]

## History

SoX was created in July 1991 by Lance Norskog and posted to the [Usenet](/source/Usenet) group alt.sources as *Aural eXchange: Sound sample translator*. With the second release (in November the same year) it was renamed *Sound Exchange*. Norskog continued to maintain and release SoX via [Usenet](/source/Usenet), [File Transfer Protocol](/source/File_Transfer_Protocol) (FTP), and then [the web](/source/The_web) until early 1995, at which time SoX was at version *11 (gamma)*. In May 1996, Chris Bagwell started to maintain and release updated versions of SoX, starting with version *sox-11gamma-cb*. In September 2000, Bagwell registered the project at [SourceForge](/source/SourceForge) with project name "sox". The registration was announced on 4 September 2000[citation needed] and SoX 12.17 was released on 7 September 2000.

Throughout its history SoX has had many contributing authors; [Guido van Rossum](/source/Guido_van_Rossum), best known as creator of the programming language [Python](/source/Python_(programming_language)), was a significant contributor in SoX's early days.[2]

Code updates at SourceForge have stopped 2015 with version 14.4.2. The [sox_ng project](https://codeberg.org/sox_ng/sox_ng) bundles bug fixes and new features from several sources, and is used by many distributions to provide the package[3][4].

## Features

Some of SoX's features are:

- Cross-platform ([Windows](/source/Microsoft_Windows), [Linux](/source/Linux), [Solaris](/source/Solaris_(operating_system)), [OS X](/source/OS_X), *et al.*)
- Reading and writing [Au](/source/Au_file_format), [WAV](/source/WAV), [AIFF](/source/Audio_Interchange_File_Format), [MP3](/source/MP3) (via an external [LAME](/source/LAME) MP3 encoder), [Ogg](/source/Ogg) [Vorbis](/source/Vorbis), [FLAC](/source/FLAC) and other [audio file formats](/source/Audio_file_format)
- Recording and playing audio (on many systems); playing via URL (internet file or stream)
- Editing via concatenate, trim, pad, repeat, reverse, volume, [fade](/source/Fade_(audio_engineering)), splice, [normalise](/source/Audio_normalization)
- Processing via [chorus](/source/Chorus_effect), [flanger](/source/Flanging), echo, [phaser](/source/Phaser_(effect)), [compressor](/source/Dynamic_range_compression), delay, [filter](/source/Audio_filter) (high-pass, low-pass, shelving, etc.)
- Adjustment of speed ([pitch](/source/Pitch_(music)) and [tempo](/source/Tempo)), pitch (without tempo), tempo (without pitch), and [sample rate](/source/Sample_rate_conversion)
- [Noise removal](/source/Audio_noise_reduction) using frequency profiling, implemented since December 2004
- [Silent passage removal](/source/Noise_gate)
- [Simple audio synthesis](/source/FM_synthesis)
- Generating [White noise](/source/White_noise), [Pink noise](/source/Pink_noise), and [Brown noise](/source/Brown_noise)
- Multi-file & [multi-track](/source/Multitrack_recording) [mixing](/source/Audio_mixing_(recorded_music))
- Multi-file merging (e.g., 2 [mono](/source/Monaural) to 1 [stereo](/source/Stereo))
- Statistical analysis; [spectrogram](/source/Spectrogram) analysis

## Examples

SoX being used to process some audio:

<nowiki>
$ sox track1.wav track1-processed.flac remix - norm -3
 highpass 22 gain -3 rate 48k norm -3 dither

Input File     : 'track1.wav'
Channels       : 2
Sample Rate    : 44100
Precision      : 16-bit
Duration       : 00:02:54.97 = 7716324 samples = 13123 CDDA sectors
Sample Encoding: 16-bit Signed Integer PCM
Endian Type    : little

Output File    : 'track1-processed.flac'
Channels       : 1
Sample Rate    : 48000
Precision      : 16-bit
Duration       : 00:02:54.97 = 8398720 samples ~ 13123 CDDA sectors
Sample Encoding: 16-bit FLAC

sox: effects chain: input      44100Hz 2 channels 16 bits (multi)
sox: effects chain: remix      44100Hz 2 channels 16 bits (multi)
sox: effects chain: norm       44100Hz 1 channels 16 bits
sox: effects chain: highpass   44100Hz 1 channels 16 bits
sox: effects chain: gain       44100Hz 1 channels 16 bits (multi)
sox: effects chain: rate       44100Hz 1 channels 16 bits
sox: effects chain: norm       48000Hz 1 channels 16 bits
sox: effects chain: dither     48000Hz 1 channels 16 bits (multi)
sox: effects chain: output     48000Hz 1 channels 16 bits (multi) </nowiki>

Playing some audio files:

<nowiki>
$ play *.ogg

01 - Summer's Cauldron.ogg:

  Encoding: Vorbis
  Channels: 2 @ 16-bit   Track: 01 of 15
Samplerate: 44100Hz      Album: Skylarking
Album gain: -7.8dB      Artist: XTC
  Duration: 00:03:19.99  Title: Summer's Cauldron

In:20.8% 00:00:41.61 [00:02:38.38] Out:1.84M [  ====|====  ]        Clip:0 </nowiki>

Generating [Brown noise](/source/Brown_noise):

<nowiki>
$ play -n synth brown
play WARN alsa: can't encode 0-bit Unknown or not applicable

 File Size: 0
  Encoding: n/a
  Channels: 1 @ 32-bit
Samplerate: 48000Hz
Replaygain: off
  Duration: unknown

In:0.00% 00:00:17.41 [00:00:00.00] Out:836k  [!=====|=====!] Hd:0.0 Clip:0 </nowiki>

## Vulnerabilities

SoX has had several vulnerabilities listed in the [National Vulnerability Database](/source/National_Vulnerability_Database) since its last public release in 2015. These vulnerabilities include [stack](/source/Stack_buffer_overflow) and [heap overflows](/source/Heap_overflow) and [denial-of-service attacks](/source/Denial-of-service_attack).

## See also

- [Digital audio](/source/Digital_audio)
- [Audio file format](/source/Audio_file_format)
- [Audio signal processing](/source/Audio_signal_processing)
- [Multitrack recording](/source/Multitrack_recording)
- [Audio mastering](/source/Audio_mastering)
- [Sample rate conversion](/source/Sample_rate_conversion)

- [Free audio software](/source/Free_audio_software)
- [List of Linux audio software](/source/List_of_Linux_audio_software)

## References

1. ["SoX licensing"](https://sourceforge.net/p/sox/code/ci/master/tree/COPYING). [Archived](https://web.archive.org/web/20210602215844/https://sourceforge.net/p/sox/code/ci/master/tree/COPYING) 2021-06-02 at the Wayback Machine. Retrieved 2021-06-02.

1. van Rossum, Guido. ["Guido van Rossum - Personal Home Page"](https://gvanrossum.github.io/). *Guido's Personal Home Page*. [Archived](https://web.archive.org/web/20180128003113/https://gvanrossum.github.io/) 28 January 2018 at the Wayback Machine. Retrieved 5 November 2021. And here is a link to SOX, to which I contributed some early code.

1. ["Debian package"](https://packages.debian.org/sid/sox). *Debian package search*. Retrieved 2026-02-01.

1. ["Gentoo package"](https://packages.gentoo.org/packages/media-sound/sox). *Gentoo package*. Retrieved 2026-02-01.

## External links

- [Official website](https://sourceforge.net/projects/sox/)
- [NVD entries for SoX](https://nvd.nist.gov/vuln/search/results?form_type=Basic&results_type=overview&query=SoX&search_type=all)

---
Adapted from the Wikipedia article [SoX](https://en.wikipedia.org/wiki/SoX) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/SoX?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
