Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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.
|
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 |
|