下载

官网下载可执行文件。

![]( https://img-blog.csdnimg.cn/20210811134558654.png?x-oss-process=image/watermark ,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwOTQ0MzEx,size_16,color_FFFFFF,t_70)

![]( https://img-blog.csdnimg.cn/20210811134648765.png?x-oss-process=image/watermark ,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwOTQ0MzEx,size_16,color_FFFFFF,t_70)

单次使用

在终端中直接运行,会出现使用方法和可选参数。

![]( https://img-blog.csdnimg.cn/20210811135035286.png?x-oss-process=image/watermark ,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwOTQ0MzEx,size_16,color_FFFFFF,t_70)

变速就设置tempo,变调就设置pitch,都变就都设置。变速的效果好像比audiotsm的效果好一些。

使用python脚本批量处理

为了方便处理,可以把soundstretch.exe添加进环境变量。

import os
 
#变速
def time_stretch(input_file, output_file, tempo):
    os.system("soundstretch %s %s -tempo=%d" % (input_file, output_file, tempo))
 
#变调
def pitch_shifting(input_file, output_file, n_steps):
    os.system("soundstretch %s %s -pitch=%d" % (input_file, output_file, n_steps))
posted on 2023-01-30 13:23  KAWAKO  阅读(71)  评论(0)    收藏  举报