How to convert mp3 to wav in Ubuntu

Install sox tool with mp3 support:

apt-get install sox
apt-get install libsox-fmt-mp3
sox file.mp3 file.wav

Basically that is all, but if you need to check resulting wav file parameters like channels, sample rate, precision, duration, bit rate, etc…, use soxi command:

soxi file.wav

With my wav file, it shows the following:

Input File     : ’emergency.wav’
Channels       : 2
Sample Rate    : 44100
Precision      : 16-bit
Duration       : 00:00:28.94 = 1276416 samples = 2170.78 CDDA sectors
File Size      : 5.11M
Bit Rate       : 1.41M
Sample Encoding: 16-bit Signed Integer PCM

to play wav file type

play file.wav

 File Size: 5.11M     Bit Rate: 1.41M
Encoding: Signed PCM
Channels: 2 @ 16-bit
Samplerate: 44100Hz
Replaygain: off
Duration: 00:00:28.94

In:12.5% 00:00:03.62 [00:00:25.32] Out:160k  [ -====|====- ] Hd:5.6 Clip:0


  1. SoX Documentation
  2. Audio manipulation with SoX

Leave a Reply

Your email address will not be published. Required fields are marked *