A newer version of the Gradio SDK is available: 6.20.0
UI_SPEC.md — The Radio
Off Brand badge bar: "pushes past the default Gradio look." The interface IS a radio. No visible Gradio chrome in the primary experience.
Implementation approach
gr.Servercustom frontend: single HTML/CSS/JS page served by the Space, talking to Gradio API routes (/api/broadcast,/api/transcribe, SSE/stream endpoint for StageEvents).- No frontend framework — vanilla JS + CSS. One file each. (Fast to build, nothing to bundle, trivially auditable for judges reading the repo.)
- Keep a minimal fallback
gr.BlocksUI mounted at/plain— REQ-02 insurance (interface must be a Gradio app) and judge-accessibility if the custom UI breaks on someone's browser.
Visual design
- The object: a 1940s wooden tabletop radio, drawn in CSS (rounded walnut cabinet, brass trim, fabric speaker grille, glass dial window). Centered, ~720px wide desktop; full-bleed mobile.
- Palette: walnut #4a2f1d, brass #c9a86a, cream dial #f3e9d2, amber glow #ffb84d, off-black room background with soft vignette.
- Type: dial numerals + station idents in a condensed retro sans (e.g. "Oswald"); body text in a humanist serif. Title card "MIDNIGHT STATIC" in deco lettering.
- Texture restraint: one wood grain, one fabric weave, subtle noise on background. No skeuomorphic overload — it should look art-directed, not clip-art.
Components & states
- Genre dial — horizontal tuning band, 6 station marks (KNOX, WEIRD, GOLD, HEART, LAFF, RAAT). Drag or click; needle animates with slight overshoot; soft static-burst audio blip (<0.3s, pre-loaded) on station change. Selected station label glows amber.
- Premise input — a "telegram slip" beneath the radio: single text field, placeholder rotates through 3 example premises. 300 char max.
- CALL IN button — brass push-button with red lamp. Press → hold-to- record (MediaRecorder) → release → transcript appears on the telegram slip for confirm/edit (never auto-submit ASR output).
- ON AIR sequence — submit → dial window becomes frequency scanner: needle sweeps, station idents fade through per StageEvent (87.9 WRITING… → 91.5 CASTING… → 94.7 FOLEY… → 98.3 SCORING… → 101.1 ON AIR). Amber "ON AIR" lamp lights on completion. The sweep is driven by real events, not a fake timer — if a stage stalls, the needle hovers (honest latency theater).
- Playback — speaker grille pulses subtly with audio amplitude (analyser node). Below the radio, the script teleprinter: lines type out karaoke-synced to playback (we know exact line timestamps from the mixer). Cast names in small caps, deliveries as stage directions.
- After the show — three brass controls: ⬇ KEEP (download MP3), ↻ ANOTHER STATION (same premise, re-pick genre — one click), ⤴ SHARE (copies link + poster if FLUX stretch landed).
- Showcase reruns — on first load, dial window shows "NOW PLAYING: reruns" with 3 pre-cached broadcasts playable instantly. A judge must hear audio within 10 seconds of landing (SPEC quality bar).
Mobile (judges will open it on phones)
- Radio scales to viewport width; dial becomes swipeable.
- Hold-to-record needs touch events + iOS Safari mic permission flow tested.
- Teleprinter collapses to current-line-only marquee.
Loading/error voice
All system text stays in-fiction:
- quota exhausted → "The station is at capacity — enjoy a rerun."
- pipeline fallback → "Our writer spilled coffee on page two. Improvising."
- mic denied → "The call-in line seems to be down. Type your premise."
Asset budget
Static assets <600KB total (textures as CSS gradients where possible, station blip + needle sounds as short OGGs). The Space must feel instant even before any model loads.
Build order (Day 3)
- Static radio render + dial interaction (2h)
- Wire /api/broadcast + StageEvent scanner (1.5h)
- Playback + teleprinter sync (1.5h)
- CALL IN + mobile pass (1.5h)
- Polish: lamp glows, needle physics, AUTHENTIC_AM toggle (1h) Fallback rule: if behind schedule, ship 1–3 polished and cut 4; a flawless mouse demo beats a buggy mic demo.