Update app.py
Browse files
app.py
CHANGED
|
@@ -89,7 +89,7 @@ def recognize_with_vad(audio: tuple[int, np.ndarray], name: str):
|
|
| 89 |
if audio is None:
|
| 90 |
return None
|
| 91 |
|
| 92 |
-
valid_res = gr.validators.is_audio_correct_length(audio, min_length=1, max_length=
|
| 93 |
if not valid_res["is_valid"]:
|
| 94 |
raise gr.Error(valid_res["message"])
|
| 95 |
|
|
@@ -156,7 +156,7 @@ with gr.Blocks(title="onnx-asr demo") as demo:
|
|
| 156 |
[recognize_short, recognize_long],
|
| 157 |
[
|
| 158 |
"Recognition of a short phrase (up to 30 sec.)",
|
| 159 |
-
"Recognition of a long phrase with VAD (up to
|
| 160 |
],
|
| 161 |
)
|
| 162 |
with gr.Accordion("Models used in this demo:", open=False):
|
|
|
|
| 89 |
if audio is None:
|
| 90 |
return None
|
| 91 |
|
| 92 |
+
valid_res = gr.validators.is_audio_correct_length(audio, min_length=1, max_length=600)
|
| 93 |
if not valid_res["is_valid"]:
|
| 94 |
raise gr.Error(valid_res["message"])
|
| 95 |
|
|
|
|
| 156 |
[recognize_short, recognize_long],
|
| 157 |
[
|
| 158 |
"Recognition of a short phrase (up to 30 sec.)",
|
| 159 |
+
"Recognition of a long phrase with VAD (up to 10 min.)",
|
| 160 |
],
|
| 161 |
)
|
| 162 |
with gr.Accordion("Models used in this demo:", open=False):
|