Codex Claude Sonnet 4.6 commited on
Commit ·
7301102
1
Parent(s): ef904db
Fix voice recording page freeze: upload-only for custom voice
Browse filesGradio's in-browser microphone freezes the page on stop-recording due to
client-side audio encoding. Switch to upload-only so users record on their
phone/voice memo app and upload the file — same cloning result, no freeze.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ui/layout.py +2 -2
ui/layout.py
CHANGED
|
@@ -542,9 +542,9 @@ def create_layout(load_sample_fn=None, create_book_fn=None):
|
|
| 542 |
elem_classes=["field", "theme-pick"],
|
| 543 |
)
|
| 544 |
custom_voice_audio = gr.Audio(
|
| 545 |
-
sources=["
|
| 546 |
type="filepath",
|
| 547 |
-
label="
|
| 548 |
visible=False,
|
| 549 |
elem_classes=["custom-voice-field"],
|
| 550 |
)
|
|
|
|
| 542 |
elem_classes=["field", "theme-pick"],
|
| 543 |
)
|
| 544 |
custom_voice_audio = gr.Audio(
|
| 545 |
+
sources=["upload"],
|
| 546 |
type="filepath",
|
| 547 |
+
label="Upload a voice recording (5–60 s of clear speech — record on your phone, then upload)",
|
| 548 |
visible=False,
|
| 549 |
elem_classes=["custom-voice-field"],
|
| 550 |
)
|