【问题标题】:sox fails to split filessox 无法拆分文件
【发布时间】:2011-03-06 12:52:59
【问题描述】:

根据手册页(已作为示例列出),以下命令应在 2 秒静音点将输入文件拆分为多个音频文件。取而代之的是,它只创建一个据报道长度约为 0.2 秒的文件。

$ sox -V3 infile.wav  outfile.ogg  silence 1 0.50 0.1% 1 3.0 0.1% : newfile : restart
sox: SoX v14.3.1
sox INFO formats: detected file format type `wav'

Input File     : 'infile.wav'
Channels       : 2
Sample Rate    : 32000
Precision      : 16-bit
Sample Encoding: 16-bit Signed Integer PCM
Endian Type    : little
Reverse Nibbles: no
Reverse Bits   : no


Output File    : 'outfile001.ogg'
Channels       : 2
Sample Rate    : 32000
Precision      : 16-bit
Sample Encoding: Vorbis
Comment        : 'Processed by SoX'

sox INFO sox: effects chain: input      32000Hz 2 channels
sox INFO sox: effects chain: silence    32000Hz 2 channels
sox INFO sox: effects chain: output     32000Hz 2 channels

仅使用 trim 的更简单示例给了我相同的结果。

【问题讨论】:

    标签: sox


    【解决方案1】:

    以下命令应在 2 秒静音点将输入文件拆分为多个音频文件

    您的命令参数 (1 0.50 0.1% 1 3.0 0.1%) 告诉 sox 在声音之前找到至少 0.5 秒的间隙,在声音之后找到 3.0 秒的间隙。如果您想检测 2s 的间隙,您应该使用“1 0.50 0.1% 1 2.0 0.1%”(或类似的)作为参数。你得到一个简短的空文件,因为“newfile:restart”命令在文件末尾运行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多