link : https://www.cyberciti.biz/faq/convert-mp3-files-to-wav-files-in-linux/linux
Type the following command under Debian / Ubuntu Linux, enter:centos
sudo apt-get install mpg321
ORbash
sudo apt-get install mpg123
I recommend using mpg123 as it is updated frequently.ide
Turn on rpmforge repo and type the following command:工具
yum install mpg123
The -w option will convert an .mp3 file to .wav file. The syntax is:post
mpg123 -w output.wav input.mp3
ORui
mpg321 -w output.wav input.mp3
Add the following to your ~/.bashrc startup file (tested with bash v3.x+):this
mp3towav(){ [[ $# -eq 0 ]] && { echo "mp3wav mp3file"; exit 1; } for i in "$@" do # create .wav file name 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:spa
mp3towav *.mp3 mp3towav "this is a test.mp3" ls *.wav
裝一下opus-tools便可code
sudo apt-get install opus-tools
Opus Tools 包含了如下幾種工具:
詳細的,看一下連接