Spaces:
Sleeping
Sleeping
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
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
|
| 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="
|
| 369 |
-
sources=["upload"],
|
| 370 |
type="filepath",
|
|
|
|
| 371 |
)
|
| 372 |
-
gr.Markdown("
|
| 373 |
|
| 374 |
gr.Markdown("### Processing Window")
|
| 375 |
with gr.Row():
|
|
|
|
| 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 23:46 UTC · 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 · wav · m4a · flac | Microphone: recorded as wav")
|
| 374 |
|
| 375 |
gr.Markdown("### Processing Window")
|
| 376 |
with gr.Row():
|