freeja commited on
Commit
3a682a4
1 Parent(s): b5a04e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -33,9 +33,9 @@ def text_to_speech(text,language):
33
  gTTS(text,lang,slow=False)
34
 
35
  def transcribe_video(URL):
36
- video = YouTube(URL)
37
- yt = video.streams.get_audio_only()
38
- yt.download()
39
  text = pipe(yt)["text"]
40
  return text
41
 
 
33
  gTTS(text,lang,slow=False)
34
 
35
  def transcribe_video(URL):
36
+ video = YouTube(str(URL))
37
+ yt = video.streams.filter(only_audio=True).first()
38
+ yt.download('youtube_audio')
39
  text = pipe(yt)["text"]
40
  return text
41