Spaces:
Runtime error
Runtime error
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 | |