aka7774 commited on
Commit
8cd95c4
·
verified ·
1 Parent(s): b1771a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -18,11 +18,13 @@ def speech_to_text(audio_file):
18
  audio = audio_from_path(audio_file)
19
  ret = transcribe(model, audio)
20
 
21
- return ret.text, "\n".join(ret.segments), "\n".join(ret.subwords)
 
 
22
 
23
  gr.Interface(
24
  fn=speech_to_text,
25
  inputs=[
26
- gr.Audio(sources="upload", type="filepath"),
27
  ],
28
- outputs=["text","text","text"]).launch()
 
18
  audio = audio_from_path(audio_file)
19
  ret = transcribe(model, audio)
20
 
21
+ return ret.text
22
+ # ret.segments
23
+ # ret.subwords
24
 
25
  gr.Interface(
26
  fn=speech_to_text,
27
  inputs=[
28
+ gr.Audio(source="upload", type="filepath"),
29
  ],
30
+ outputs="text").launch()