KingNish commited on
Commit
f4dad5f
1 Parent(s): f4b0f55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -14,8 +14,9 @@ default_lang = "en"
14
  engines = { default_lang: Model(default_lang) }
15
 
16
  def transcribe(audio):
17
- client5=InferenceClient("openai/whisper-medium")
18
- text=client5.automatic_speech_recognition(audio).text
 
19
  return text
20
 
21
  HF_TOKEN = os.environ.get("HF_TOKEN", None)
 
14
  engines = { default_lang: Model(default_lang) }
15
 
16
  def transcribe(audio):
17
+ lang = "en"
18
+ model = engines[lang]
19
+ text = model.stt_file(audio)[0]
20
  return text
21
 
22
  HF_TOKEN = os.environ.get("HF_TOKEN", None)