Spaces:
Running on Zero
Running on Zero
Commit History
-
fix(01-11): resume the AudioContext inside the gesture, refuse to speak on a stopped clock
The owner heard nothing on a phone. The only resume() on the turn path was in playBuffer, after the ~7 s server round trip and therefore outside the tap's user activation; a browser that gates audio behind a gesture (iOS Safari, Chromium in a cross-origin embed) leaves the context suspended, and Chromium keeps a blocked resume() promise pending forever, so the page sat on "speaking..." in silence. - stagePort gains a seventh method, unlockAudio(): synchronous, issues resume() in the caller's own call stack (inline), or relays it to the frame (iframe; stage.html handles 'avatar:unlockAudio') - turn-loop.js calls it as the FIRST statement of dispatchTurn, replay, requestSlower and startListening, before any await; host.js calls avatar.unlockAudio() first thing in all six gesture handlers, and the facade exposes it so a host can pre-unlock on any tap - playBuffer bounds its own resume() (RESUME_GRACE_MS) and, if the context is still not running, emits 'error' where: 'audio' a…6b68c4d
-
feat(01-03): add both transports, the standalone stage page and the Gradio component
- avatar/avatar.js: inline transport, 145 lines of stagePort plumbing only - avatar/avatar-iframe.js: postMessage transport, same facade and same turn loop - both use a deferred event bus so events emitted during mountStage (notably the no-expressionManager error) survive until installFacade builds the real one - avatar/stage.html: iframe target and standalone debug harness; ?demo=1 plays a canned WAV against a hand-authored placeholder timeline - avatar/assets/demo-konnichiwa.wav: 24000 Hz mono 16-bit, 1.129 s - avatar_component.py + app.py: AVATAR_TRANSPORT selects the module in one place - vrm-stage.js: reword the import-map comment so the stage core names no host - ignore and un-lint Gradio's auto-generated .pyi component stubf822421