Rehman1603 commited on
Commit
243c47f
1 Parent(s): 496bbeb

Create Merged_Chunks.py

Browse files
Files changed (1) hide show
  1. Merged_Chunks.py +10 -0
Merged_Chunks.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from pydub import AudioSegment
2
+
3
+ def Merged_chunks(chunk_list):
4
+ output_file = "merged_audio.wav"
5
+ merged_audio = AudioSegment.empty()
6
+ for chunk in chunk_list:
7
+ segment = AudioSegment.from_file(chunk)
8
+ merged_audio = merged_audio + segment
9
+ merged_audio.export(output_file, format="wav")
10
+ return output_file