Silemo commited on
Commit
8c8f6d3
·
1 Parent(s): 695b1d9

Fix app.py - download audio examples

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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("audio/" + filename,'wb') as f:
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