Sox 错误的输入格式。未指定采样率

问题描述 投票:0回答:1

我有以下 sox 脚本来拆分我在其中指定采样率的音频文件,但它仍然会抛出错误“未指定采样率”:

sox input.raw output.raw trim 0 10800 : newfile : restart -r 48000 -e signed -b 16 -c 1

我错过了什么?

sox
1个回答
0
投票

参数是位置性的。语法是这样的:

sox [global-options] [format-options] infile1
[[format-options] infile2] ... [format-options] outfile
[effect [effect-options]] ...

https://sox.sourceforge.net/sox.html

所以如果选项

-r 48000 -e signed -b 16 -c 1
都适用于
input.raw
那么你想要这样的东西:

sox -r 48000 -e signed -b 16 -c 1 input.raw output.raw trim 0 10800 : newfile : restart
© www.soinside.com 2019 - 2024. All rights reserved.