RASMUS commited on
Commit
cad610c
1 Parent(s): f866116

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -10
app.py CHANGED
@@ -11,11 +11,6 @@ os.system('bash ./whisper.cpp/models/download-ggml-model.sh medium')
11
  os.system('bash ./whisper.cpp/models/download-ggml-model.sh large')
12
  os.system('bash ./whisper.cpp/models/download-ggml-model.sh base.en')
13
 
14
- #os.system('./whisper.cpp/main -m whisper.cpp/models/ggml-base.en.bin -f whisper.cpp/samples/jfk.wav')
15
- #print("SEURAAVAKSI SMALL TESTI")
16
- #os.system('./whisper.cpp/main -m whisper.cpp/models/ggml-small.bin -f whisper.cpp/samples/jfk.wav')
17
- #print("MOI")
18
-
19
 
20
  import gradio as gr
21
  from pathlib import Path
@@ -25,11 +20,7 @@ import re
25
  import time
26
 
27
  from pytube import YouTube
28
- #from transformers import MarianMTModel, MarianTokenizer
29
 
30
- import psutil
31
- num_cores = psutil.cpu_count()
32
- os.environ["OMP_NUM_THREADS"] = f"{num_cores}"
33
  headers = {'Authorization': os.environ['DeepL_API_KEY']}
34
 
35
 
@@ -227,7 +218,8 @@ def speech_to_text(video_file_path, selected_source_lang, whisper_model):
227
  2. Watch it in the first video component
228
  3. Run automatic speech recognition on the video using fast Whisper models
229
  4. Translate the recognized transcriptions to 26 languages supported by deepL
230
- 5. Burn the translations to the original video and watch the video in the 2nd video component
 
231
 
232
  Speech Recognition is based on models from OpenAI Whisper https://github.com/openai/whisper
233
  This space is using c++ implementation by https://github.com/ggerganov/whisper.cpp
 
11
  os.system('bash ./whisper.cpp/models/download-ggml-model.sh large')
12
  os.system('bash ./whisper.cpp/models/download-ggml-model.sh base.en')
13
 
 
 
 
 
 
14
 
15
  import gradio as gr
16
  from pathlib import Path
 
20
  import time
21
 
22
  from pytube import YouTube
 
23
 
 
 
 
24
  headers = {'Authorization': os.environ['DeepL_API_KEY']}
25
 
26
 
 
218
  2. Watch it in the first video component
219
  3. Run automatic speech recognition on the video using fast Whisper models
220
  4. Translate the recognized transcriptions to 26 languages supported by deepL
221
+ 5. Download generated subtitles in .vtt and .srt formats
222
+ 6. Watch the the original video with generated subtitles
223
 
224
  Speech Recognition is based on models from OpenAI Whisper https://github.com/openai/whisper
225
  This space is using c++ implementation by https://github.com/ggerganov/whisper.cpp