Created
August 13, 2024 08:41
-
-
Save Dobby233Liu/c96f770dab66b9ef00eb1d58d5a67824 to your computer and use it in GitHub Desktop.
whaaat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pydub import AudioSegment | |
from itertools import islice | |
def batched(iterable, n): | |
i = 0 | |
while i < len(iterable): | |
yield iterable[i:i+n] | |
i += n | |
THRESOLD = 3000 | |
song = AudioSegment.from_file("icepalace_boss loopfix2.flac") | |
newsong = song.empty() | |
for i in batched(song, THRESOLD): | |
print(i) | |
newsong += i.normalize(6) | |
newsong.export("mashup.ogg", format="ogg") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment