link:https://www.cyberciti.biz/faq/convert-mp3-files-to-wav-files-in-linux/
Install mpg321 or mpg123
Type the following command under Debian/ubuntu Linux, enter:
sudo Install mpg321
OR
sudo Install mpg123
I recommend using mpg123 as it is updated frequently.
Install mpg123 under Centos/rhel/fedora Linux
Turn on Rpmforge repo and type the following command:
Install mpg123
Convert an MP3 to WAV
THE-W option would convert an. mp3 file to. wav file. The syntax is:
Mpg123-w output.wav Input.mp3
OR
mpg321-w output.wav Input.mp3
A Sample Shell Script Helper Function
Add the following to your ~/.BASHRC startup file (tested with bash v3.x+):
mp3towav () {[[$#-eq0]] && {Echo "mp3wav Mp3file"; Exit1; } forIinch "[email protected]" Do# Create. wavfilename Local out="${i%/*}.wav" [[ -F"$i"]] && {Echo-N"processing ${i} ..."; Mpg123-W "${out}" "$i"&>/dev/NULL&&Echo "Done ."||Echo "failed."; } Done}
Use it as follows:
Mp3towav *"This isa Test.mp3"ls *.wav
Linux Convert mp3 to WAV