9ea5eb31c1
Keep the avatar mounted while all connection, permission, privacy and diagnostic controls live in a settings sheet. Save the tested continuous-body renderer, safe transition driver and foreground HELLO/permission workflow from this session. Pin runtime03 for the code14 UI-only candidate; mouth deformation remains unresolved. Add source UI contracts, an optional sensor-free device probe, exact asset import and candidate packaging checks. Portrait binaries and diagnostics remain private and untracked.
67 lines
12 KiB
Markdown
67 lines
12 KiB
Markdown
# Android 0.6.1/code12 — safe neutral graph integration
|
|
|
|
Development stage, not a released APK. The user resumed complete Android implementation, self-validation and final packaging. Final activation needs the coordinator's actual material/edge review and exact manifest SHA; no additional per-step user approval is required. The owner is producing `a01-neutral-graph-v1` independently, bounded to five video calls (estimated ≤$1.70). Failed old raw/large-mouth/sigh-like clips must never be substituted. At this stage the allowlist is empty and no graph APK has been packaged, committed, pushed or installed.
|
|
|
|
Retain `fdd91234b5910ee18e4a75c24c0a49de596cc4fa` and the existing 0.6.0/code11 artifact unchanged: `artifacts/lan-voice-v060-arm64-debug.apk`, SHA256 `37f789820e86ac1656bda546f47ece3e4533ff8fc54614b171fd8a42accaa52e`. 0.5.1/0.5.2 artifacts are retained too. Android may reject a lower version code over a newer installation; no downgrade/data-preservation promise or device data clearing is implied.
|
|
|
|
## Implemented behavior
|
|
|
|
Foreground entry automatically attempts health→authenticated WS→real server HELLO. Then MIC/CAMERA permission requests are sequential and remembered. No recording before MIC grant and actual foreground. Granted MIC starts voice independently of camera or video readiness; denied camera permits audio. Denied MIC has an explicit authorization/settings action, no automatic prompt loop. Three transport attempts per foreground cycle use 1s/3s backoff, stop on busy and expose manual retry. Transport retry does not generate another LLM reply. Failed voice start is visibly bounded too.
|
|
|
|
No dial/hangup or simulated incoming-call UX remains in the screen. Close/background the app to stop. PAUSE stops mic/camera/audio/video and clears face/sharing. A pending system permission may also STOP the Activity: retain only its continuation and fenced socket for at most 30s, never sensors. A genuine STOP disconnects WS; DESTROY releases all resources. Initially muted start is applied before capture; camera-off/denial persists. Explicit camera settings enable intent survives return from settings. Face sharing remains independently default off and clears on camera-off/disconnect/background; camera permission alone never enables sharing or image transmission.
|
|
|
|
The single white full-canvas screen uses Fit, preserving complete head/feet and aspect ratio on portrait/landscape/tablets. White system bars and safe insets, a status pill, visible mic/camera status, bounded scrollable controls and expandable details support small screens. Details preserve the real current/previous seven-state reply tags, neutral asset resolution/fallback, face presence/cue, AEC and explicit diagnostics. No happy/sad/etc video is claimed. Existing face model/thresholds/10Hz/TTL/diagnostics are unchanged; face acceptance is separate. Physical layout/font-scale/ROM permission acceptance remains device work.
|
|
|
|
## Actual renderer, not just a pure planner
|
|
|
|
`SafeTransitionPlanner` consumes only latest generation/revision/turn-scoped desired mouth state. That desired state comes from actual AudioTrack playback-head consumption of 20ms RMS/peak metadata, with the existing bounded 120ms silence/underrun release. Arrival, writes, tts-start and ANSWERING phase never authorize a reveal. Partial writes/cross-block windows/u32 wrap/reset/bounded metadata and drained/abort fences remain. No fixed startup buffer was added; audio never waits for video.
|
|
|
|
The fixed five-node contract is idle A→A / opening A→B / talk1 B→B / talk2 B→B / closing B→A. `end-talk` and `idle-start` alias that same closing node/file. The two talk self-loops, both mutual directions, both opening→talk and talk→closing edges, idle→opening and closing→idle must all be reviewed. Missing any required junction rejects complete activation. The planner chooses a legal upcoming variant at segment entry with injectable randomness, preferring the other legal talk over an immediate repeat. Stop cancels its hidden continuation and prepares closing. Opening reversal follows legal short completion/junctions toward the latest idle intent; an old callback cannot restore an old turn's talk. Native audio abort remains immediate.
|
|
|
|
`SafeVideoDriver` operates at most two `AnchorVideoPort`s: current clip and one paused upcoming entry. `CodecAnchorVideoPort` uses native MediaExtractor/MediaCodec on a worker looper. It seeks to a preceding sync frame, discards preroll, validates normalized CFR/PTS and renders one output at a time. TextureView's actual latched timestamp must match the submitted codec PTS. The target remains held at its reviewed entry, never an unrelated running phase. A source with another output in flight cannot supply its old texture as a fresh observation.
|
|
|
|
A reveal requires the target's verified entry plus a real source displayed frame inside an approved exit, followed by a fresh second source observation and successful planner commit. No timer or expired budget grants a hard cut. Late windows wait for a separately approved loop; ended nonloop clips cannot extend their last-frame window to authorize a late cut. A final-frame hold after a missed nonloop window is an exceptional failed route, not continuous animation or a freeze-based material fix. A loop may wrap only with approved seam metadata. Releasing/restarting epochs fences old source/target/error callbacks. Decode/resource/format/timestamp/timeout failures show a static exception with a retained failure enum and never delay audio. No double-face crossfade, reverse, acceleration or mouth-coordinate camera input is used.
|
|
|
|
The controlled local-layer candidate also offers opening→closing for reversal. This optional direct B junction is accepted only if individually reviewed and does not remove any required talk edge. Its shared authored mouth alpha/body deformation and exact raw endpoint pixels are provenance/production constraints, not encoded-edge approval. Authored alpha thresholds alone cannot mark perceived mouthStateWindows approved.
|
|
|
|
Prepared targets may require decoder creation repeatedly at short segment boundaries. Two-decoder capacity, TextureView timestamps at PTS0, scheduling/pacing/seek cost, frame drops/black flashes and thermal behavior need actual API31 device validation. Tests with deterministic Android API doubles verify control flow; they cannot certify hardware decoding or seamless motion.
|
|
|
|
## Honest response measurements
|
|
|
|
Each approved clip may contain reviewed `mouthStateWindows` (`active` / `closed_stable`) with exact frame intervals. Only a displayed frame in those windows completes a measured mouth response. Entering TALK or revealing a clip does not. Missing evidence leaves `mouthActiveLagMs`/`closingLagMs` null and visual wait pending. Logs expose desired/actual clip, requested/selected emotion, finite reason, full pending wait and completed response durations at ≤1Hz, clamped for diagnostic upload. No raw PCM/chat/images/coefficients/error text is added.
|
|
|
|
Target ≤1s remains an acceptance goal, not an achieved claim. Natural silence includes 120ms detector release, source-window wait, nonoverlapped preparation, bridge-to-mouth-event and presentation. A 0.7s talk wait +0.3s closing +0.12s release already totals1.12s, so preferred clip ranges alone cannot pass. Opening/closing activity timing, idle exit spacing and full-route latency need actual material traces and device measurement. No exact phoneme/real-person lip sync or 200ms guarantee is claimed.
|
|
|
|
## Private asset import and release gate
|
|
|
|
Accepted original crossed-arms test reference SHA256: `36a078ad9e1d2929612e9baa2af524bda90dafceddc4515dd448fc08121d7dd2`. Rights remain unverified; test identity approval is not commercial authorization. It is imported separately as static fallback; no failed video was imported. The complete graph source is `.runtime/avatar-imports/a01-neutral-graph-v1/`, manifest SHA **pending coordinator review**. Reference/source lineage, motion quality, edges, loops, preparation and device acceptance are distinct gates.
|
|
|
|
`docs/AVATAR_NEUTRAL_GRAPH_INTERFACE.md` defines the exact handoff/evidence/budget. `SafeAvatarManifest` rejects malformed metadata, returns no runnable graph for pending/unannotated/rejected material, and requires an exact approved SHA allowlist. The runtime additionally verifies five neutral/silent file hashes, all graph paths, full contract completeness and static fallback hash. Unknown pack/decoder failure visibly falls back; it cannot activate archived clips. Original imports remain intact; Gradle excludes old seated/arms-down packs from the new APK.
|
|
|
|
Reproduce after obtaining authorized private material out of band:
|
|
|
|
```bash
|
|
python3 scripts/import-standing-avatar.py /path/to/original-arms-reference.png --arms-reference
|
|
# Only after the coordinator approves actual evidence and supplies the exact final hash:
|
|
python3 scripts/import-avatar-graph.py /path/to/a01-neutral-graph-v1 --approved-manifest-sha SHA --verify-only
|
|
python3 scripts/import-avatar-graph.py /path/to/a01-neutral-graph-v1 --approved-manifest-sha SHA
|
|
./scripts/check-avatar-regressions.sh
|
|
./scripts/build.sh :app:compileDebugKotlin
|
|
# Requires matching docs/avatar manifest/review text and runtime SHA allowlist:
|
|
./scripts/package-avatar-safe-release.sh
|
|
```
|
|
|
|
The importer confines paths/size/hashes, preflights existing bytes and refuses unknown overwrites. Private directories/files use0700/0600. Runtime imports, portraits/videos/logs/APKs remain ignored. Git will contain code, tests, docs and exact text manifest/hash/review only. No portrait binary is committed. A source checkout alone cannot reproduce the private visuals.
|
|
|
|
`scripts/package-avatar-safe-release.sh` checks tested-source hashes, all nine JVM entry points, full74 gateway regression, exact reviewed/allowlisted manifest and imported bytes; then builds through the isolated toolchain. It validates0.6.1/code12, arm64/min26/target34, apksigner and identical certificate to0.5.1/0.5.2/0.6.0, exact APK asset bytes and uncompressedMP4, and HTTP APK/checksum bytes. It refuses replacing retained APKs or an existing0.6.1. HTTP revalidation can use `--verify-existing` without rebuilding. Final path will be `artifacts/lan-voice-v061-arm64-debug.apk` plus `.apk.sha256`; no such final artifact exists at this stage.
|
|
|
|
## Validation and remaining work
|
|
|
|
Use `logs/avatar-safe-061/` for current client/expression/gateway/compile evidence and source hashes. Synthetic planner/driver fixtures use20fps made-up intervals; `synthetic-player-trace.json` is a finite control trace, not footage annotations, real PCM or material approval. Tests cover full graph/missing junctions, seeded continuation, entry/texture gating, missed windows/EOS/wrap, cancel/reversal/abort/old-turn/background, decoder errors/watchdogs, two-port bounds, mouth-event evidence/nulls, Fit aspect, sequential permissions/denials/settings and finite reconnect, plus retained native audio/capture/protocol/face regressions. The74 gateway suite runs temporary source copies with a checksum-verified existing Silero artifact, no service calls or live dialogue inference.
|
|
|
|
Before final package: receive reviewed new graph, read real quality/edge/loop/PTS evidence and previews, align normalized paths/windows, record exact manifest/review text, enable its hash, rerun affected checks and compile, then package/commit/push. If opening/talk quality or any junction fails, report the specific missing node/bridge instead of shipping a fake full graph. No extra generation beyond the bounded owner batch is initiated here.
|
|
|
|
On the coordinator's existing Windows USB ADB (`-s 0123456789ABCDEF`), install the verified final APK with `install -r` and check package version/signature. This agent does not configure USB/wireless/USBIP/SSH, clear data, launch recording or grant permissions. Device acceptance: first entry/granted/denied/permanently denied/revoked permissions and dialog STOP orders; mic mute; independent camera/share; busy/network failure/retry; voice/PCM silence/underrun/drain/abort; all graph junctions, stop/resume/reversal at varied offsets; actual mouth-response times; background/resume; portrait/landscape/small screen/tablet/large fonts; unsupported decoder/static failure. No new device report or face-recovery claim exists.
|
|
|
|
Backend/provider/model/TTS voice parameters, ASR/VAD services and container configuration were not changed or restarted.
|