- 查看音頻信息
soxi a.wav
sox a.wav -n stat
- 修改頻率赴背、通道數(shù)、位深
sox infile.wav -r 48k -c 1 -b 16 outfile.wav
- wav轉(zhuǎn)為raw數(shù)據(jù)
sox in.wav -b 16 -e signed-integer -c 1 -r 48k -t raw out.raw
- raw轉(zhuǎn)為wav蚜厉,此時(shí)需要指明raw文件的bit rate encode 不然sox識別不了
也可以同時(shí)修改通道數(shù)
sox -b 16 -e signed-integer -c 1 -r 48k -t raw out.raw out.wav
sox -t raw -r 16000 -e signed-integer -b 16 -c3 raw.pcm out.wav remix 1 2
- 兩個單通道合成一個立體聲
sox -M input.l.wav input.r.wav output.wav
- 提取指定通道的數(shù)據(jù)事富,可以任意變換順序
sox in.wav out.wav remix 1
sox in.wav out.wav remix 1 2
sox in.wav out.wav remix 3 2
- trim 切割音頻,也可以指定區(qū)段播放
sox in.wav out.wav trim 0 10
play in.wav trim 12:34 =15:00 -2:00