从PySox设置Sox的“可重复”选项

时间:2019-01-21 15:33:21

标签: python audio sox

Sox允许用户通过指定-R自变量:http://sox.sourceforge.net/sox.html

从命令行中指定“可重复”选项。
$ sox input.wav output.wav -R -G

但是,当将Python包装器用于Sox,PySox时,我还没有找到在Python调用代码中设置相同标志的方法。例如,我想将Repeatable选项添加到以下转换代码中:

sox_transformer = sox.Transformer()
sox_transformer.set_globals(guard=True)
sox_transformer.convert(
    samplerate=int(sample_rate),
    bitdepth=int(bit_depth),
)
sox_transformer.build(
    source_file, target_file)

PySox文档似乎未包含有关以下内容的任何信息:https://pysox.readthedocs.io/en/latest/api.html

0 个答案:

没有答案