Dubb_YouTube_Video / Merged_Chunks.py
Rehman1603's picture
Create Merged_Chunks.py
243c47f verified
raw
history blame
319 Bytes
from pydub import AudioSegment
def Merged_chunks(chunk_list):
output_file = "merged_audio.wav"
merged_audio = AudioSegment.empty()
for chunk in chunk_list:
segment = AudioSegment.from_file(chunk)
merged_audio = merged_audio + segment
merged_audio.export(output_file, format="wav")
return output_file