Spaces:
Runtime error
Runtime error
Fix app.py - download audio examples
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ def download_audio(audio_url, filename):
|
|
12 |
|
13 |
# send a HTTP request to the server and save
|
14 |
# the HTTP response in a response object called r
|
15 |
-
with open(
|
16 |
|
17 |
# Saving received content as a mp3 file in
|
18 |
# binary format
|
@@ -30,7 +30,7 @@ def transcribe_video(url):
|
|
30 |
stream = yt.streams.get_audio_only()
|
31 |
|
32 |
# Saves the audio in the /audio folder
|
33 |
-
audio = stream.download(output_path = "audio/"
|
34 |
|
35 |
text = transcribe(audio)
|
36 |
|
|
|
12 |
|
13 |
# send a HTTP request to the server and save
|
14 |
# the HTTP response in a response object called r
|
15 |
+
with open(filename,'wb') as f: #"audio/" +
|
16 |
|
17 |
# Saving received content as a mp3 file in
|
18 |
# binary format
|
|
|
30 |
stream = yt.streams.get_audio_only()
|
31 |
|
32 |
# Saves the audio in the /audio folder
|
33 |
+
audio = stream.download() #output_path = "audio/"
|
34 |
|
35 |
text = transcribe(audio)
|
36 |
|