使用sox消除音频剪辑的最佳方法是什么?

时间:2016-04-14 20:43:10

标签: audio sox

我正在尝试将一些音频文件转换为机器学习的原始格式,我需要确保不会发生剪辑,因为我不希望它污染我的数据集。

这个问题已经asked before,但不幸的是,这些解决方案并不适用于我。

已提出几种方案来帮助缓解此问题。

--norm选项看起来效果不好......

$ for name in *.au; do sox --norm ${name} -c 1 -r 44100 --bits 8 ${name}.mono-sr41000-ss8.raw; done
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?

-v 0.99选项似乎不能很好地运作:

$ for name in *.au; do sox -v 0.99 ${name} -c 1 -r 44100 --bits 8 ${name}.mono-sr41000-ss8.raw; done
sox WARN rate: rate clipped 11 samples; decrease volume?
sox WARN dither: dither clipped 8 samples; decrease volume?
sox WARN rate: rate clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN rate: rate clipped 12 samples; decrease volume?
sox WARN dither: dither clipped 9 samples; decrease volume?
sox WARN rate: rate clipped 6 samples; decrease volume?
sox WARN dither: dither clipped 5 samples; decrease volume?
sox WARN rate: rate clipped 10 samples; decrease volume?
sox WARN dither: dither clipped 11 samples; decrease volume?
sox WARN rate: rate clipped 3 samples; decrease volume?
sox WARN dither: dither clipped 3 samples; decrease volume?
sox WARN rate: rate clipped 2 samples; decrease volume?
sox WARN dither: dither clipped 2 samples; decrease volume?
ubuntu@ip-10-217-154-40:~/data/genre/genres/blues$ for name in *.au; 

-G选项似乎效果最好。但是,即使使用此选项,也会发生一些削波。

$ for name in *.au; do sox -G ${name} -c 1 -r 41000 --bits 8 ${name}.mono-sr41000-ss8.raw; done
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 2 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?

组合-G和--norm比单独使用它们更糟糕......

$ for name in *.au; do sox -G --norm ${name} -c 1 -r 44100 --bits 8 ${name}.mono-sr41000-ss8.raw; done
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 2 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?

更新:进一步降低音量似乎消除了剪辑。
这是最好的解决方案吗?

$ for name in *.au; do sox -G -v 0.95 ${name} -c 1 -r 44100 --bits 8 ${name}.mono-sr41000-ss8.raw; done
sox WARN dither: dither clipped 1 samples; decrease volume?
sox WARN dither: dither clipped 1 samples; decrease volume?

$ for name in *.au; do sox -G -v 0.9 ${name} -c 1 -r 44100 --bits 8 ${name}.mono-sr41000-ss8.raw; done

0 个答案:

没有答案