首页 > 解决方案 > sox splice 不遵守默认的excess=0.005 和leeway=0.005 并丢失太多音频?

问题描述

使用sox splice时,默认的余量和余量为 0.005 秒。这意味着 audio1 与 audio2 的拼接应该丢失不少于 0.01 秒的音频总数。但是,我看到的接头短于 audio1+audio2-0.01 秒。

sox splice: usage: [-h|-t|-q] {position[,excess[,leeway]]}
  -h        Half sine fade (default); constant gain (for correlated audio)
  -t        Triangular (linear) fade; constant gain (for correlated audio)
  -q        Quarter sine fade; constant power (for correlated audio e.g. x-fade)
  position  The length of part 1 (including the excess)
  excess    At the end of part 1 & the start of part2 (default 0.005)
  leeway    Before part2 (default 0.005; set to 0 for cross-fade)

这里我拼接了两个 0.046 秒的文件,最终得到一个 0.073 秒的文件:

$ soxi -D 1.wav 2.wav
0.046440
0.046440
$ sox 1.wav 2.wav 3.wav splice -h `soxi -D 1.wav`
$ soxi -D 3.wav
0.072925

为什么3.wav这么短?

2 * 0.046440 - 0.01 = .082880

我的输出文件不应短于 0.082880。但我的输出文件是 0.072925 秒。为什么?

标签: audiosox

解决方案


推荐阅读