If you want to convert a .wav file to a .mp3 file, you can use lame
command-line tool.
To install lame:
$ sudo apt-get install lame
and use with:
$ lame input.wav input.mp3
lame can be used to convert .wav files to .mp3 files and .mp3 files to .mp3 files too. Different bit-rates can be specified.
For example, if you want to convert your .mp3 file from 128kbps to 64kbps:
$ lame --mp3input -b 64 input.mp3
If output file name doesn’t specified, lame gave it the input file’s name.
--mp3input
parameter specifies that input file is a .mp3 file.