This topic a bit out of focus of web development, but its more for the opensouce folks out here.. like us. SoX or Sound eXchange is a cross platform swiss army knife of sound processing. You can do a lot of stuff with sound files using SoX including convertion of various formats of computer audio files in to other formats, apply various effects to these sound files, and, as an added bonus, SoX can play and record audio files.
This is what the ubuntu manual has to say about SoX
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.
A simple install of SoX from the ubuntu terminal doesn’t work with .ogg and .ogg-vorbis files. You have to do it manually. If you don’t need ogg and vorbis support, you can use the following command in terminal to install SoX.
sudo apt-get install libasound2-plugins libasound2-python libsox-fmt-all sudo apt-get install sox
But this method will not give you support for ogg ond other open source sound formats vorbis. We will compile SoX from source here. We will need basic tools like make and g++ installed. If you dont have them, install them with,
sudo apt-get install g++ make
Lets install vorbis-tools first
sudo apt-get install vorbis-tools
We will also need libogg and libvorbis libraries from Xiph.Org
First lets install libogg, libvorbis needs libogg to be installed.
cd /tmp && wget -O libogg-1.3.0.tar.gz http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz tar zxvf libogg-1.3.0.tar.gz && cd libogg-1.3.0 ./configure && make sudo make install
Now lets install libvorbis
cd /tmp && wget -O libvorbis-1.3.3.tar.gz http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz tar zxvf libvorbis-1.3.3.tar.gz && cd libvorbis-1.3.3 ./configure && make sudo make install
Lets install some additional libraries for SoX to be prefect,
sudo apt-get install libasound2-plugins libasound2-python libsox-fmt-all
Now lets install SoX into Ubuntu. We will be compling the SoX from source.
cd ~/ && mkdir sox wget http://sourceforge.net/projects/sox/files/sox/14.4.0/sox-14.4.0.tar.gz/download tar xvzf download cd sox-14.4.0 ./configure make -s && make install
Now you will have to add /usr/local/lib to /etc/ld.so.conf and then run /sbin/ldconfig
sudo vi /etc/ld.so.conf
Add this new line
include /usr/local/lib at the end
Well.. thats all.. You will now have SoX running from your terminal now.
Tags: sox, ubuntu