Update utils/audio_processing.py
Browse files
utils/audio_processing.py
CHANGED
@@ -13,13 +13,7 @@ AudioSegment.converter = shutil.which("ffmpeg")
|
|
13 |
# Download audio from a Video url
|
14 |
# -------------------------------
|
15 |
|
16 |
-
|
17 |
-
# Fix padding if necessary
|
18 |
-
missing_padding = len(data) % 4
|
19 |
-
if missing_padding:
|
20 |
-
data += "=" * (4 - missing_padding)
|
21 |
-
return base64.b64decode(data)
|
22 |
-
|
23 |
def download_audio_as_wav(url, max_filesize_mb=70):
|
24 |
"""
|
25 |
Downloads audio from a URL using yt-dlp, then converts it to WAV using ffmpeg.
|
|
|
13 |
# Download audio from a Video url
|
14 |
# -------------------------------
|
15 |
|
16 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
def download_audio_as_wav(url, max_filesize_mb=70):
|
18 |
"""
|
19 |
Downloads audio from a URL using yt-dlp, then converts it to WAV using ffmpeg.
|