sox je švýcarský armádní nůž audio manipulace, který se nachází ve stejnojmenném balení. Po instalaci se můžeme podívat na jeho manuálové stránky, kde je jasně uvedeno, že umí nejen přehrávat zvukový soubor, ale také s ním manipulovat! Zde jsou řádky kódu:
SoX reads and writes audio files in most popular formats and can optionally apply effects to them. It can combine multiple input sources, synthesise audio, and, on many systems, act as a general purpose audio player or a multi-track audio recorder. It also has limited ability to split the input into multiple output files. All SoX functionality is available using just the sox command. To simplify playing and recording audio, if SoX is invoked as play, the output file is automatically set to be the default sound device, and if invoked as rec, the default sound device is used as an input source. Additionally, the soxi(1) command provides a convenient way to just query audio file header information. The heart of SoX is a library called libSoX. Those interested in extending SoX or using it in other programs should refer to the libSoX manual page: libsox(3). SoX is a command-line audio processing tool, particularly suited to making quick, simple edits and to batch processing. If you need an interactive, graphical audio editor, use audacity(1).
Jak můžeme vidět v předchozím popisu, sox a soxi lze použít pro mnoho různých použití při manipulaci se zvukovými soubory.
Pokud při spuštění příkazu soxi narazíte na níže uvedenou chybu:
soxi: command not found
Můžete zkusit nainstalovat níže uvedený balíček podle vaší volby distribuce.
Distribuce | Příkaz |
---|---|
OS X | brew install sox |
Debian | apt-get install sox |
Ubuntu | apt-get install sox |
Alpine | apk add sox |
Arch Linux | pacman -S sox |
Kali Linux | apt-get install sox |
CentOS | yum install sox |
Fedora | instalace dnf sox |
Raspbian | apt-get install sox |