Update app.py
Browse files
app.py
CHANGED
|
@@ -117,11 +117,12 @@ def speech_to_text(video_file_path, selected_source_lang, whisper_model):
|
|
| 117 |
This space allows you to:
|
| 118 |
1. Download youtube video with a given url
|
| 119 |
2. Watch it in the first video component
|
| 120 |
-
3. Run automatic speech recognition on the video using Whisper
|
| 121 |
-
4. Translate the recognized transcriptions to
|
| 122 |
5. Burn the translations to the original video and watch the video in the 2nd video component
|
| 123 |
|
| 124 |
-
Speech Recognition is based on OpenAI Whisper https://github.com/openai/whisper
|
|
|
|
| 125 |
"""
|
| 126 |
|
| 127 |
if(video_file_path == None):
|
|
@@ -308,14 +309,14 @@ with demo:
|
|
| 308 |
### This space allows you to:
|
| 309 |
##### 1. Download youtube video with a given URL
|
| 310 |
##### 2. Watch it in the first video component
|
| 311 |
-
##### 3. Run automatic speech recognition on the video using Whisper
|
| 312 |
-
##### 4. Translate the recognized transcriptions to
|
| 313 |
##### 5. Burn the translations to the original video and watch the video in the 2nd video component
|
| 314 |
''')
|
| 315 |
|
| 316 |
with gr.Column():
|
| 317 |
gr.Markdown('''
|
| 318 |
-
### 1. Insert Youtube URL below
|
| 319 |
##### 1. https://www.youtube.com/watch?v=nlMuHtV82q8&ab_channel=NothingforSale24
|
| 320 |
##### 2. https://www.youtube.com/watch?v=JzPfMbG1vrE&ab_channel=ExplainerVideosByLauren
|
| 321 |
##### 3. https://www.youtube.com/watch?v=S68vvV0kod8&ab_channel=Pearl-CohnTelevision
|
|
@@ -336,7 +337,7 @@ with demo:
|
|
| 336 |
with gr.Column():
|
| 337 |
gr.Markdown('''
|
| 338 |
##### Here you can start the transcription and translation process.
|
| 339 |
-
##### Be aware that processing will last
|
| 340 |
''')
|
| 341 |
selected_source_lang.render()
|
| 342 |
selected_whisper_model.render()
|
|
@@ -357,7 +358,7 @@ with demo:
|
|
| 357 |
with gr.Column():
|
| 358 |
gr.Markdown('''
|
| 359 |
##### Here you will get translated transcriptions.
|
| 360 |
-
##### Please remember to select
|
| 361 |
##### ''')
|
| 362 |
selected_translation_lang_2.render()
|
| 363 |
translate_transcriptions_button = gr.Button("Step 3. Translate transcription")
|
|
|
|
| 117 |
This space allows you to:
|
| 118 |
1. Download youtube video with a given url
|
| 119 |
2. Watch it in the first video component
|
| 120 |
+
3. Run automatic speech recognition on the video using fast Whisper models
|
| 121 |
+
4. Translate the recognized transcriptions to 26 languages supported by deepL
|
| 122 |
5. Burn the translations to the original video and watch the video in the 2nd video component
|
| 123 |
|
| 124 |
+
Speech Recognition is based on models from OpenAI Whisper https://github.com/openai/whisper
|
| 125 |
+
This space is using c++ implementation by https://github.com/ggerganov/whisper.cpp
|
| 126 |
"""
|
| 127 |
|
| 128 |
if(video_file_path == None):
|
|
|
|
| 309 |
### This space allows you to:
|
| 310 |
##### 1. Download youtube video with a given URL
|
| 311 |
##### 2. Watch it in the first video component
|
| 312 |
+
##### 3. Run automatic speech recognition on the video using Whisper
|
| 313 |
+
##### 4. Translate the recognized transcriptions to 26 languages supported by deepL
|
| 314 |
##### 5. Burn the translations to the original video and watch the video in the 2nd video component
|
| 315 |
''')
|
| 316 |
|
| 317 |
with gr.Column():
|
| 318 |
gr.Markdown('''
|
| 319 |
+
### 1. Insert Youtube URL below. Some test videos below:
|
| 320 |
##### 1. https://www.youtube.com/watch?v=nlMuHtV82q8&ab_channel=NothingforSale24
|
| 321 |
##### 2. https://www.youtube.com/watch?v=JzPfMbG1vrE&ab_channel=ExplainerVideosByLauren
|
| 322 |
##### 3. https://www.youtube.com/watch?v=S68vvV0kod8&ab_channel=Pearl-CohnTelevision
|
|
|
|
| 337 |
with gr.Column():
|
| 338 |
gr.Markdown('''
|
| 339 |
##### Here you can start the transcription and translation process.
|
| 340 |
+
##### Be aware that processing will last some time. With base model it is around 3x speed
|
| 341 |
''')
|
| 342 |
selected_source_lang.render()
|
| 343 |
selected_whisper_model.render()
|
|
|
|
| 358 |
with gr.Column():
|
| 359 |
gr.Markdown('''
|
| 360 |
##### Here you will get translated transcriptions.
|
| 361 |
+
##### Please remember to select target language
|
| 362 |
##### ''')
|
| 363 |
selected_translation_lang_2.render()
|
| 364 |
translate_transcriptions_button = gr.Button("Step 3. Translate transcription")
|