# 语音切割,以毫秒为单位
start_time=0
end_time=2000
part = sound[start_time:end_time]
#调整音量大小
louder_via_method = sound.apply_gain(+3.5) # 提高
quieter_via_method = sound.apply_gain(-5.7) # 减小#调整多声道音频的左右声道音量#如果单声道音频调用此方法,它将先被转换为多声道
stereo_balance_adjusted = sound.apply_gain_stereo(-6, +2)
#左右声道平衡,按百分比增大一边,减小另一边# pan the sound 15% to the right
panned_right = sound.pan(+0.15)
# # pan the sound 50% to the left
panned_left = sound.pan(-0.50)
#语音文件切割
part = sound[start_time:end_time]
#定义切割文件名称
data_split_filename='save.wav')
#保存切割文件
part.export(data_split_filename, format="wav")