根据手册页(它被作为示例列出),下面的命令应该在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的简单示例给出了相同的结果。
发布于 2011-07-06 20:31:28
以下命令应在静默2秒的情况下将输入文件分割为多个音频文件
命令的参数(1 0.50 0.1%1 3.0 0.1%)告诉sox在声音之前至少查找0.5s的间隙,在声音之后查找3.0s的间隙。如果您想要检测2s间隔,您应该使用"1 0.50 0.1%1 2.0 0.1%“(或类似的)作为参数。你得到了短的空文件,因为"newfile : restart“命令在文件的末尾运行。
https://stackoverflow.com/questions/5210582
复制相似问题