Vadym Myroshnyk commited on
Commit ·
158b097
1
Parent(s): 615e634
save
Browse files
service/oral/oral_service.py
CHANGED
|
@@ -83,6 +83,7 @@ def oral_exercise(audio_dir: str, expected_result_dir: str):
|
|
| 83 |
|
| 84 |
with gr.Row():
|
| 85 |
mic = gr.Audio(sources=["microphone"], type="filepath", label="🎤 Your recording")
|
|
|
|
| 86 |
output = gr.Textbox(
|
| 87 |
value=texts[i],
|
| 88 |
label="📝 Transcribed",
|
|
@@ -145,6 +146,7 @@ def oral_exercise(audio_dir: str, expected_result_dir: str):
|
|
| 145 |
|
| 146 |
if audio_inputs and textboxes:
|
| 147 |
gr.Button("🧠 Transcribe").click(fn=on_transcribe, inputs=audio_inputs[0], outputs=textboxes[0])
|
|
|
|
| 148 |
gr.Button("✅ Check").click(
|
| 149 |
fn=on_check,
|
| 150 |
inputs=textboxes,
|
|
|
|
| 83 |
|
| 84 |
with gr.Row():
|
| 85 |
mic = gr.Audio(sources=["microphone"], type="filepath", label="🎤 Your recording")
|
| 86 |
+
|
| 87 |
output = gr.Textbox(
|
| 88 |
value=texts[i],
|
| 89 |
label="📝 Transcribed",
|
|
|
|
| 146 |
|
| 147 |
if audio_inputs and textboxes:
|
| 148 |
gr.Button("🧠 Transcribe").click(fn=on_transcribe, inputs=audio_inputs[0], outputs=textboxes[0])
|
| 149 |
+
gr.Button("🔁 Record again").click(fn=lambda: None, inputs=[], outputs=[mic], queue=False)
|
| 150 |
gr.Button("✅ Check").click(
|
| 151 |
fn=on_check,
|
| 152 |
inputs=textboxes,
|