Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def extract_yt_audio(it, video_url, video_file):
|
|
24 |
yt = YouTube(video_url, use_oauth=True)
|
25 |
a = yt.streams.filter(only_audio=True).first()
|
26 |
audio_file = a.download()
|
27 |
-
sample = AudioSegment.from_file(audio_file
|
28 |
elif it == 'URL':
|
29 |
response = requests.get(video_url)
|
30 |
video_data = BytesIO(response.content)
|
|
|
24 |
yt = YouTube(video_url, use_oauth=True)
|
25 |
a = yt.streams.filter(only_audio=True).first()
|
26 |
audio_file = a.download()
|
27 |
+
sample = AudioSegment.from_file(audio_file, format="mp4")
|
28 |
elif it == 'URL':
|
29 |
response = requests.get(video_url)
|
30 |
video_data = BytesIO(response.content)
|