Spaces:
Running
on
Zero
Running
on
Zero
Tim-gubski
commited on
Commit
•
b4228ae
1
Parent(s):
51d1d6a
Update mergeoggs.py
Browse files- mergeoggs.py +2 -2
mergeoggs.py
CHANGED
@@ -4,9 +4,9 @@ from pydub import AudioSegment
|
|
4 |
def merge(out_dir, *files):
|
5 |
if len(files)==0:
|
6 |
raise ValueError("No files to merge")
|
7 |
-
combined = AudioSegment.from_file(files[0], format="
|
8 |
for file in files[1:]:
|
9 |
-
sound = AudioSegment.from_file(file, format="
|
10 |
combined = combined.overlay(sound)
|
11 |
combined.export(out_dir, format="ogg")
|
12 |
|
|
|
4 |
def merge(out_dir, *files):
|
5 |
if len(files)==0:
|
6 |
raise ValueError("No files to merge")
|
7 |
+
combined = AudioSegment.from_file(files[0], format="mp3")
|
8 |
for file in files[1:]:
|
9 |
+
sound = AudioSegment.from_file(file, format="mp3")
|
10 |
combined = combined.overlay(sound)
|
11 |
combined.export(out_dir, format="ogg")
|
12 |
|