Spaces:
Runtime error
Runtime error
Commit
·
79f7cdb
1
Parent(s):
f6bdd90
active yt_transcribe
Browse files
app.py
CHANGED
@@ -175,10 +175,10 @@ def _return_yt_html_embed(yt_url):
|
|
175 |
return HTML_str
|
176 |
|
177 |
def yt_transcribe(yt_url):
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
|
183 |
ydl_opts = {
|
184 |
'format': 'bestvideo*+bestaudio/best',
|
@@ -431,12 +431,7 @@ with demo:
|
|
431 |
[video_in, selected_source_lang, selected_whisper_model, number_speakers],
|
432 |
[transcription_df, system_info, download_transcript]
|
433 |
)
|
434 |
-
|
435 |
-
with gr.Row():
|
436 |
-
gr.Markdown('''
|
437 |
-
##### Here you will get transcription output
|
438 |
-
##### ''')
|
439 |
-
|
440 |
|
441 |
with gr.Row():
|
442 |
with gr.Column():
|
|
|
175 |
return HTML_str
|
176 |
|
177 |
def yt_transcribe(yt_url):
|
178 |
+
yt = YouTube(yt_url)
|
179 |
+
html_embed_str = _return_yt_html_embed(yt_url)
|
180 |
+
stream = yt.streams.filter(only_audio=True)[0]
|
181 |
+
stream.download(filename="audio.mp3")
|
182 |
|
183 |
ydl_opts = {
|
184 |
'format': 'bestvideo*+bestaudio/best',
|
|
|
431 |
[video_in, selected_source_lang, selected_whisper_model, number_speakers],
|
432 |
[transcription_df, system_info, download_transcript]
|
433 |
)
|
434 |
+
|
|
|
|
|
|
|
|
|
|
|
435 |
|
436 |
with gr.Row():
|
437 |
with gr.Column():
|