如何将任何mp3文件转换为.wav 16khz单声道16位

如何将任何mp3文件转换为.wav 16khz单声道16位

问题描述:

请帮助选择将mp3文件转换为特殊.wav的解决方案-我是Linux命令行工具的新手,所以现在对我来说很难.

Please, help to choose solution for converting any mp3 file to special .wav - I'm a newbie with Linux command line tools, so It's hard for me right now.

我需要从任何mp3文件中获取具有16khz单声道16位声音属性的wav.我正在尝试

I need to get wav with 16khz mono 16bit sound properties from any mp3 file. I was trying

ffmpeg -i 111.mp3 -ab 16k out.wav,

ffmpeg -i 111.mp3 -ab 16k out.wav,

但是我的wav与mp3(22k)的速率相同.

but I got wav with the same rate as mp3 (22k).

请帮助构建正确的命令行

Please, help to construct right command line

kdazzle的解决方案已面市-它仍然输出立体声wav,这是生成单声道的稍作修改的版本:

kdazzle's solution is almost there - it still output a stereo wav, here is a slightly modified version that generate mono:

ffmpeg -i 111.mp3 -acodec pcm_s16le -ac 1 -ar 16000 out.wav

此外,如果这是用于预处理狮身人面像4的语音数据,请参见此处:

also, if this is for pre-processing speech data for sphinx 4 see here: Convert audio files for CMU Sphinx 4 input