bdstar commited on
Commit
649294c
·
verified ·
1 Parent(s): 1c04da9

transcribe only English.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ stt_model = WhisperModel(WHISPER_SIZE, device="cuda" if os.environ.get("CUDA_VIS
29
  compute_type="float16" if os.environ.get("CUDA_VISIBLE_DEVICES") else "int8")
30
 
31
  def speech_to_text(audio_path: str) -> str:
32
- segments, info = stt_model.transcribe(audio_path, beam_size=1, vad_filter=True)
33
  text = "".join(seg.text for seg in segments).strip()
34
  return text
35
 
 
29
  compute_type="float16" if os.environ.get("CUDA_VISIBLE_DEVICES") else "int8")
30
 
31
  def speech_to_text(audio_path: str) -> str:
32
+ segments, info = stt_model.transcribe(audio_path, beam_size=1, vad_filter=True, language="en")
33
  text = "".join(seg.text for seg in segments).strip()
34
  return text
35