有两种方式:
1、利用ffmpeg 请看另一篇文章 <<安装FFmpeg>>
2、speex:
speex-1.2.0: 下载
wget https://downloads.xiph.org/releases/speex/speex-1.2.0.tar.gz
tar xzvf speex-1.2.0.tar.gz
cd speex-1.2.0 && ./configure && make && make install
微信解码扩展包:
git clone https://github.com/gamelife1314/wechat-speex-declib.git
cd wechat-speex-declib && make && cp ./bin/speex_decode /usr/local/bin/speex2wav
speex-devel:
yum install speex-devel
使用方法:
speex2wav xxx.amr xxxx.mp3
speex2wav xxx.speex xxxx.wav