Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -641,7 +641,7 @@ base_audio_drive = "/data/audio"
|
|
641 |
|
642 |
# result = pipe_asr({"array": stream, "sampling_rate": sr}, return_timestamps=False)
|
643 |
|
644 |
-
# full_text = result.get("text")
|
645 |
|
646 |
# return stream, full_text, result
|
647 |
|
@@ -872,8 +872,10 @@ with gr.Blocks(theme='Pijush2023/scikit-learn-pijush') as demo:
|
|
872 |
clear_button.click(fn=clear_textbox, inputs=None, outputs=chat_input)
|
873 |
|
874 |
audio_input = gr.Audio(sources=["microphone"], streaming=True, type='numpy')
|
875 |
-
audio_input.stream(transcribe_function, inputs=[state, audio_input], outputs=[state, chat_input], api_name="voice_query_to_text")
|
876 |
-
|
|
|
|
|
877 |
|
878 |
gr.Markdown("<h1 style='color: red;'>Map</h1>", elem_id="location-markdown")
|
879 |
location_output = gr.HTML()
|
|
|
641 |
|
642 |
# result = pipe_asr({"array": stream, "sampling_rate": sr}, return_timestamps=False)
|
643 |
|
644 |
+
# full_text = result.get("text","")
|
645 |
|
646 |
# return stream, full_text, result
|
647 |
|
|
|
872 |
clear_button.click(fn=clear_textbox, inputs=None, outputs=chat_input)
|
873 |
|
874 |
audio_input = gr.Audio(sources=["microphone"], streaming=True, type='numpy')
|
875 |
+
# audio_input.stream(transcribe_function, inputs=[state, audio_input], outputs=[state, chat_input], api_name="voice_query_to_text")
|
876 |
+
audio_input.stream(transcribe_function, inputs=[state, audio_input], outputs=[state, chat_input], api_name="voice_query_to_text").then(
|
877 |
+
fn=clear_textbox, inputs=None, outputs=chat_input
|
878 |
+
)
|
879 |
|
880 |
gr.Markdown("<h1 style='color: red;'>Map</h1>", elem_id="location-markdown")
|
881 |
location_output = gr.HTML()
|