# coding: utf-8
from pydub import AudioSegment
namePrefix = '武侠小说_雪山飞狐_'
startInx =41
endInx =44
index = startInx+1
song = AudioSegment.from_mp3(namePrefix +str(startInx) + '.mp3')
while index <= endInx:
song = song + AudioSegment.from_mp3(namePrefix +str(index) + '.mp3')
index=index+1
song.export(namePrefix + str(startInx) + str(endInx) + "merg.mp3", format="mp3", bitrate='16k')
本文介绍了一种使用PyDub库将多个MP3文件合并为一个文件的方法,详细展示了如何加载多个音频片段并进行拼接,最后导出为单一音频文件的过程。
1888

被折叠的 条评论
为什么被折叠?



