asterisk 语音文件转换

Centos

wav to sln

sox foo-in.wav -t raw -r 8000 -s -2 -c 1 foo-out.sln

当前目录下所有语音wav文件 转换成sln

for a in *.wav; do sox "$a" -t raw -r 8000 -s -2 -c 1 `echo $a|sed "s/.wav/.sln/"` resample -ql; done

wav to gsm

sox foo.wav -r 8000 -c1 foo.gsm resample -ql

当前目录下所有语音wav文件 转换成gsm

for a in *.wav; do sox "$a" -r 8000 -c1 "`echo $a|sed -e s/wav//`gsm" resample -ql; done

posted @ 2013-09-12 11:17  RocTian  阅读(548)  评论(0编辑  收藏  举报