usertea commited on
Commit
d940cee
·
1 Parent(s): c3d36fc

EchoScript : app.py: sources=[upload, microphone] added to the gr.Audio component. Gradio renders this as a tabbed widget: one tab for file upload (drag-and-drop or browse), one tab with a record button for the microphone. Added format=wav so microphone recordings are always saved as wav regardless of browser - this ensures a consistent, known extension that passes through validate_extension without any additional handling.No changes needed to services/audio.py - .wav was already in SUPPORTED_EXTENSIONS from day one, so microphone recordings go through exactly the same validation and transcription path as uploaded files. The time-window fields also work with microphone recordings, so you can record a long clip and transcribe only a specific portion if needed.

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -357,7 +357,7 @@ with gr.Blocks(title="EchoScript") as demo:
357
  **Upload Audio → Select Audio Window → Detect Language & Generate Transcript
358
  → Preview & Choose Languages → Generate Translations → Copy / Download**
359
 
360
- <sub>build: 2026-07-02 01:21 UTC &middot; fixed fa/pt/tr model names &middot; short labels &middot; Select All</sub>
361
  """
362
  )
363
 
@@ -365,11 +365,12 @@ with gr.Blocks(title="EchoScript") as demo:
365
  with gr.Column(scale=1):
366
  gr.Markdown("### Upload Audio")
367
  audio_input = gr.Audio(
368
- label="Drop audio file here or click to browse",
369
- sources=["upload"],
370
  type="filepath",
 
371
  )
372
- gr.Markdown("Supported: mp3 &middot; wav &middot; m4a &middot; flac")
373
 
374
  gr.Markdown("### Processing Window")
375
  with gr.Row():
 
357
  **Upload Audio &rarr; Select Audio Window &rarr; Detect Language & Generate Transcript
358
  &rarr; Preview & Choose Languages &rarr; Generate Translations &rarr; Copy / Download**
359
 
360
+ <sub>build: 2026-07-02 23:46 UTC &middot; microphone input added</sub>
361
  """
362
  )
363
 
 
365
  with gr.Column(scale=1):
366
  gr.Markdown("### Upload Audio")
367
  audio_input = gr.Audio(
368
+ label="Upload a file or record from microphone",
369
+ sources=["upload", "microphone"],
370
  type="filepath",
371
+ format="wav",
372
  )
373
+ gr.Markdown("Upload: mp3 &middot; wav &middot; m4a &middot; flac &nbsp;|&nbsp; Microphone: recorded as wav")
374
 
375
  gr.Markdown("### Processing Window")
376
  with gr.Row():