KingNish commited on
Commit
f4b0f55
1 Parent(s): 5d81f8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -14,9 +14,8 @@ default_lang = "en"
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)
 
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)