ffmpeg调整音量(减小3dB)
ffmpeg -i input.wav -af volume=-3dB output.wav
ffmpeg将pcm格式转化成wav
ffmpeg -ar 8000 -ac 1 -f s16le -i input.pcm output.wav
之前用ffmpeg对音频做格式转化时不需要加入-ar,-ac,-f等参数,但pcm需要,不知道为什么
ffmpeg将两个通道的语音分别分离出来:
ffmpeg -i input.wav -map_channel 0.0.0 output1.wav -map_channel 0.0.1 output2.wav
ffmpeg对一段长语音每隔30s切分一次:
ffmpeg -i input.wav -f segment -segment_time 30 -c copy input%d.wav
用kaldi测asr的wer和ser:
cd src/bin/compute-wer
./compute-wer --text --mode=all ark:./ref.txt ark:./rec.txt