from pydub import AudioSegment
# 读取音频文件
audio = AudioSegment.from_file("input_audio.wav", format="wav")
# 循环播放三次
looped_audio = audio * 3
# 导出为新的音频文件
looped_audio.export("output_audio.wav", format="wav")
from pydub import AudioSegment
# 读取音频文件
audio = AudioSegment.from_file("input_audio.wav", format="wav")
# 循环播放三次
looped_audio = audio * 3
# 导出为新的音频文件
looped_audio.export("output_audio.wav", format="wav")