RASMUS commited on
Commit
4487b3c
1 Parent(s): 95c5b27

update to use fi language flag

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -9,6 +9,7 @@ if os.path.isdir(f'{os.getcwd() + os.sep}whisper.cpp'):
9
  print("Models already loaded")
10
  else:
11
  os.system('git clone https://github.com/ggerganov/whisper.cpp.git')
 
12
  os.system('git clone https://huggingface.co/Finnish-NLP/Finnish-finetuned-whisper-models-ggml-format')
13
  os.system('make -C ./whisper.cpp')
14
 
@@ -61,7 +62,7 @@ def speech_to_text(audio_path, whisper_model):
61
  print("starting whisper c++")
62
  srt_path = new_path + ".srt"
63
  os.system(f'rm -f {srt_path}')
64
- os.system(f'./whisper.cpp/main "{new_path}" -t 4 -m ./{whisper_modelpath_translator.get(whisper_model)} -osrt')
65
  print("starting whisper done with whisper")
66
  except Exception as e:
67
  raise RuntimeError(f'Error running Whisper cpp model: {e}') from e
 
9
  print("Models already loaded")
10
  else:
11
  os.system('git clone https://github.com/ggerganov/whisper.cpp.git')
12
+ os.system("git reset --hard 3163090d89c47933d7c2a080b224f0d2e842b468")
13
  os.system('git clone https://huggingface.co/Finnish-NLP/Finnish-finetuned-whisper-models-ggml-format')
14
  os.system('make -C ./whisper.cpp')
15
 
 
62
  print("starting whisper c++")
63
  srt_path = new_path + ".srt"
64
  os.system(f'rm -f {srt_path}')
65
+ os.system(f'./whisper.cpp/main "{new_path}" -t 4 -m ./{whisper_modelpath_translator.get(whisper_model)} -osrt -l fi')
66
  print("starting whisper done with whisper")
67
  except Exception as e:
68
  raise RuntimeError(f'Error running Whisper cpp model: {e}') from e