Spaces:
Running
on
Zero
Running
on
Zero
| """ | |
| Audio input components. | |
| Provides audio recording/upload and analyze button. | |
| Segmentation mode is now auto-detected by VAD. | |
| """ | |
| import gradio as gr | |
| from i8n import t | |
| def create_audio_input_section() -> dict: | |
| """ | |
| Create audio input with analyze button. | |
| Returns: | |
| Dict with keys: | |
| - audio_input: gr.Audio component | |
| - analyze_btn: gr.Button (initially hidden) | |
| """ | |
| audio_input = gr.Audio( | |
| sources=["microphone", "upload"], | |
| type="numpy", | |
| label=t("audio.label"), | |
| show_label=False | |
| ) | |
| analyze_btn = gr.Button(t("controls.analyze"), variant="primary", visible=False) | |
| return { | |
| "audio_input": audio_input, | |
| "analyze_btn": analyze_btn, | |
| } | |