Spaces:
Runtime error
Runtime error
show expected result
Browse files
app.py
CHANGED
@@ -176,7 +176,7 @@ def stt(default_lang: str, audio: Tuple[int, np.array], state=None):
|
|
176 |
|
177 |
recognized_result = client(audio, sample_rate, default_lang)
|
178 |
|
179 |
-
return recognized_result
|
180 |
|
181 |
|
182 |
def _convert_audio(audio_data: np.array, sample_rate: int):
|
@@ -202,7 +202,10 @@ def iface(ui_language):
|
|
202 |
gr.inputs.Audio(type="numpy", label=UI_STRINGS["labels"]["input"][ui_language], source="microphone", optional=False),
|
203 |
gr.inputs.State(label="Resultado esperado")
|
204 |
],
|
205 |
-
outputs=
|
|
|
|
|
|
|
206 |
title=UI_STRINGS["title"][ui_language],
|
207 |
theme="huggingface",
|
208 |
description=UI_STRINGS["description"][ui_language],
|
|
|
176 |
|
177 |
recognized_result = client(audio, sample_rate, default_lang)
|
178 |
|
179 |
+
return recognized_result, state
|
180 |
|
181 |
|
182 |
def _convert_audio(audio_data: np.array, sample_rate: int):
|
|
|
202 |
gr.inputs.Audio(type="numpy", label=UI_STRINGS["labels"]["input"][ui_language], source="microphone", optional=False),
|
203 |
gr.inputs.State(label="Resultado esperado")
|
204 |
],
|
205 |
+
outputs=[
|
206 |
+
gr.outputs.Textbox(label=UI_STRINGS["labels"]["output"][ui_language]),
|
207 |
+
gr.inputs.State(label="Resultado esperado")
|
208 |
+
],
|
209 |
title=UI_STRINGS["title"][ui_language],
|
210 |
theme="huggingface",
|
211 |
description=UI_STRINGS["description"][ui_language],
|