Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -62,10 +62,13 @@ with gr.Blocks() as demo:
|
|
62 |
with gr.Column():
|
63 |
gr.Markdown(f"# Realtime Whisper Large V3 Turbo: \n Transcribe Audio in Realtime. This Demo uses the Checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers.\n Note: The first token takes about 5 seconds. After that, it works flawlessly.")
|
64 |
with gr.Row():
|
65 |
-
input_audio_microphone = gr.Audio(streaming=True)
|
66 |
output = gr.Textbox(label="Transcription", value="")
|
67 |
latency_textbox = gr.Textbox(label="Latency (seconds)", value="0.0", scale=0)
|
68 |
with gr.Row():
|
69 |
-
clear_button = gr.Button("Clear Output")
|
|
|
|
|
|
|
70 |
|
71 |
demo.launch()
|
|
|
62 |
with gr.Column():
|
63 |
gr.Markdown(f"# Realtime Whisper Large V3 Turbo: \n Transcribe Audio in Realtime. This Demo uses the Checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers.\n Note: The first token takes about 5 seconds. After that, it works flawlessly.")
|
64 |
with gr.Row():
|
65 |
+
input_audio_microphone = gr.Audio(streaming=True)
|
66 |
output = gr.Textbox(label="Transcription", value="")
|
67 |
latency_textbox = gr.Textbox(label="Latency (seconds)", value="0.0", scale=0)
|
68 |
with gr.Row():
|
69 |
+
clear_button = gr.Button("Clear Output")
|
70 |
+
|
71 |
+
input_audio_microphone.stream(transcribe, [input_audio_microphone, output], [output, latency_textbox], time_limit=45, stream_every=2, concurrency_limit=None)
|
72 |
+
clear_button.click(clear, outputs=[output])
|
73 |
|
74 |
demo.launch()
|