Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
|
|
|
|
22 |
|
23 |
gr.Interface(
|
24 |
fn=speech_to_text,
|
25 |
inputs=[
|
26 |
-
gr.Audio(
|
27 |
],
|
28 |
-
outputs=
|
|
|
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()
|