Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -14,9 +14,8 @@ default_lang = "en"
|
|
14 |
engines = { default_lang: Model(default_lang) }
|
15 |
|
16 |
def transcribe(audio):
|
17 |
-
|
18 |
-
|
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)
|