BassWow commited on
Commit
f305011
1 Parent(s): 9450953
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,7 +23,7 @@ def speech_to_text(tmp_filename, model_size):
23
 
24
  # print the recognized text
25
  print(result.text)
26
- return result.text
27
 
28
 
29
  gr.Interface(
@@ -39,5 +39,5 @@ gr.Interface(
39
  inputs=[
40
  gr.Audio(label="Record your voice on your mic",source="microphone", type="filepath"),
41
  gr.Dropdown(label="Select model size",value="base",choices=["tiny", "base", "small", "medium", "large"])],
42
- outputs="text").launch()
43
 
 
23
 
24
  # print the recognized text
25
  print(result.text)
26
+ return f"Detected language: {max(probs, key=probs.get)}", result.text
27
 
28
 
29
  gr.Interface(
 
39
  inputs=[
40
  gr.Audio(label="Record your voice on your mic",source="microphone", type="filepath"),
41
  gr.Dropdown(label="Select model size",value="base",choices=["tiny", "base", "small", "medium", "large"])],
42
+ outputs=["text","text"]).launch()
43