Wire reviewed emotion bridges and action media playback fences

This commit is contained in:
zenord
2026-10-13 02:09:38 +08:00
parent 4ead34a944
commit 515d106da7
28 changed files with 961 additions and 65 deletions
+60 -11
View File
@@ -28,7 +28,7 @@ See [asset contract](AVATAR_PACK_V2_CONTRACT.md).
Pending: happy/sad TALK packages and their
own mouths/bridges, Pi exact manifest review, idle variants, two real music dances,
asset file/decode import gate and actual v2 bridge/media renderer integration.
approved asset import and publication (v2 bridge/media source wiring is now implemented below).
No new asset is admitted in this APK; default action capability remains absent.
Existing neutral runtime04 bytes are preserved. No naturalness approval is inferred
from hashes, tests or fixtures. Real device/GPU/music tail/≤1s perception: **not_run**.
@@ -84,10 +84,10 @@ Asset-owner update: P1 free amplitude previews completed in its own
`.runtime/avatar-imports/a01-expression-action-v1/p1-amplitude-01/`; Pi selected1.1
source pixels for candidate production based on fixed comparisons. Dynamic visual
review remains pending. Nearest-level/opacity1/zero-bypass rendering stays intact.
Latest coordinator ledger snapshot: **6 submitted**, known video fee **$0.96**,
image fee unknown (supersedes earlier4/$0.68 and5/$0.86 snapshots, not an all-time total).
sad001 idle rejected for visible opening/strong expression; sad0022s inspection
continues in `p4a-sad-revision-02`. Happy own mouth uses1.1 sourcepx and actual97
Latest coordinator batch ledger snapshot: **8 submitted**, known video fee **$1.14**,
3 image fees unknown (supersedes earlier snapshots, not an all-time total).
sad001 idle rejected for visible opening/strong expression; sad00249-frame revision
also rejected for opening around1–1.7s. Targeted sad003 is in its own frame gate. Happy own mouth uses1.1 sourcepx and actual97
source PTS; dynamic12s review pending. First real frame0-to-frame0 entry bridge
is in `bridge-review/neutral-happy-enter-001`; its gate determines later bridges.
Bodies/own-mouth/bridges are not admitted;
@@ -99,10 +99,9 @@ four outputs. They cannot guarantee all future finals. `reply.emotion.prepare` i
**preload-only**, turn/seq scoped; it must not select visible expression or start
speech. The final `reply.emotion` event is authoritative. Duplicate/mismatched/
truncated/extra-field finals cancel preparation; after_action emotion is excluded
from prefix preparation and is displayed only in its later speech turn. Current
MainActivity has no approved multi-pack preload implementation wired to this hook;
the protocol hook and deterministic planner are tested separately, not claimed as
actual new expression pixels on code16. The code16 APK remains unchanged/rollback.
from prefix preparation and is displayed only in its later speech turn. The code16 rollback APK has no multi-pack rendering. The current source wires this
hook to hidden preload and final-authoritative real media playback, still requiring
a Pi-pinned complete index before activation. The code16 APK remains unchanged/rollback.
Post-code16 source milestone starts from clean/pushed
`4358fc9cae27bcad01b0098690c4a77fa4767d13`. New schema2 per-body parser, frame
@@ -116,7 +115,8 @@ New multi-package planner keeps prepare separate from final selection and actual
visible package. Sad→neutral→happy executes only reviewed source frames/bridges;
serial/turn fences reject stale/repeated presentation, and missing own mouth
falls back as a whole package. Index retains bridge clip metadata for its future
driver. It remains unwired to MainActivity until asset/bridge admission is complete.
driver. That planner milestone was not wired to MainActivity; the next source milestone
below implements the actual playback driver and view.
Followup validation: 2,361 dynamic frame/level/rejection checks, 15 invalid graph/
cache cases; all nine JVM entries + UI checks; 40 offline real EGL/GLES goldens;
@@ -135,5 +135,54 @@ owner files/previews were not changed. Evidence:
`logs/avatar-safe-061/`; gateway98-test and compile summaries are in the same
dynamic-n evidence directory. No new live probes, paid calls, deployments,
service restarts or code16 replacement in this milestone. Whole visual/action
release remains pending approved own-mouth/bridges/index and media integration;
release remains pending approved own-mouth/bridges/index and publication;
device/AudioRecord/GPU/perceptual≤1s remain not_run.
Media-wiring source milestone (development baseline
`4ead34a944bbe27ba2acca602c9651ff8a16ef0b`):
MainActivity/VoiceSession now share an Activity-owned AvatarMediaBinding and real
EmotionActionAvatarView: three bounded held GLES composite slots and one music
TextureView. Prepare only warms a hidden package; final emotion selects its own
body/mouth, with intensity2 retained and slight visual intensity1. Body changes
wait for exact reviewed source frame, closed mouth, prepared bridge0 and target
entry. Renderer prerolls to actual entry PTS, handles variable N/fps and loop
ordinals, and fences retired frame/turn callbacks. Non-native loop edges play their
actual bridge. Missing package/own-mouth/path degrades the whole package; an
invalid external v2 import can fall back to independently pinned neutral runtime.
Settings keep the same view/driver; the home remains character plus gear only.
Action plan admission now independently requires accepted local playback drain.
Actual AudioRecord-stop acknowledgement precedes music start; unknown/failed stop
keeps capture blocked. Cancellation while acknowledgement is pending waits both
capture and native release. Music starts only at the declared source frame with
mouth disabled, reveals on actual first texture PTS, joins native completion and
final PTS (either callback order), then waits native stop/release and actual restored
idle entry before completed. Native errors, settings/background/disconnect/new turn
and stale callbacks cancel; no additional LLM/provider/TTS change. Hardware texture
timestamps, physical microphone/music-tail behavior and naturalness remain not_run.
Happy schema2 candidate read-only Gate1 passed exact manifest
`8d4e56e356d0da3ab9260c448c986fcdb2ef42b66a0dfba11f7bd5dbfeb81b2e`:
97 decoded frames/PTS,4.041667s,485 own PNGs,486 files,1,617,000 RGBA cache bytes,
full decode and real Kotlin admission. The first combined gate failed due to fixture
player records leaking into an older static-admission assertion; fixture isolation
was corrected and the complete gate rerun passed. No owner asset writes or relabeling.
Empty legalExitFrames is deliberately not approved; full index is still absent.
No APK assembled/published in this milestone, no gateway deploy/restart or live probe;
code16 URL/SHA above remains rollback. Live deployment remains gateway0.8.0/Qwen
json_schema/Asia-Shanghai as last verified. Code-owner paid calls:0. Next handoff is
**MEDIA_WIRING_READY_FOR_PARTIAL_PI_PIN**: neutral+happy, each complete own runtime,
reviewed loops and both actual bridges, index SHA and Pi approval; `actions:[]` is
valid and advertises no dance. Sad and the two complete music dances can follow.
Exact fields/paths are in AVATAR_PACK_V2_CONTRACT.md; capability is not silently
claimed complete. Ignored evidence is in `logs/action-emotion/media-wiring/`.
Media-wiring validation: **9 JVM entry points + UI source contracts passed**, including
43 actual production view/binding/renderer/MediaPlayer callback fixture cases and
15 held-port driver boundary cases (58 new cases total). Existing2,361 dynamic
N×5 checks and15 invalid graph/cache cases also pass. Local gateway98 tests:
97 passed/1 existing Silero artifact skip.40 offline EGL/GLES goldens passed.
Application and Android instrumentation Kotlin compilation passed; instrumentation
execution and real device capture/GPU/perception were not run.
+35 -4
View File
@@ -31,12 +31,13 @@ Frame indices/PTS are actual decoded values. Every changed body phase requires a
reviewed edge, no arbitrary alpha cut. Supply dense seam frames, real-speed loops
and full-scale/close previews, not just matching endpoints.
Actions: exactly `asset_01`, `asset_02`, `kind:dance`, `mouthAllowed:false`,
Actions may be `[]` for a partial conversation-only index. Dance requires exactly
`asset_01`, `asset_02`, `kind:dance`, `mouthAllowed:false`,
`disallowTALK:true`,
`entryAnchor:A`, `returnAnchor:A`, `clip` with file SHA/dimensions/frameCount/PTS/
duration/audio track metadata, `audioEndUs`, `reviewEvidence`.
Use a single complete video including entry, music dance and return A, or list
explicitly hashed sequential segments with reviewed edges. Music must actually
Current player accepts a **single complete video including entry, music dance and
return A**. Separately hashed sequential segments are not yet supported. Music must actually
exist, end naturally, and actor must not talk/sing. Source/music provenance and
job/fee ledger stay in owner storage; Git stores metadata only.
@@ -101,4 +102,34 @@ Deliver corrected runtime paths/hashes plus complete index hash, reviewed loop/
enter/return clip paths/hashes, timed seam previews and Pi's external exact pin.
Conversation planning retains clip metadata and assigns each bridge execution a
unique serial; stale completion cannot authorize a later bridge with the same id.
Playback driver integration and capability activation remain separate work.
MainActivity now uses the real multi-pack/bridge/music driver; capability activation
still requires the external exact index pin and file admission.
Next pin / asset handoff (media-wiring stage, no activation):
- A partial neutral+happy index is sufficient; sad can follow in a later pinned index.
Each included package needs its own schema2 runtime04 and actual N×5 data;
an independently hash-validated legacy neutral runtime04 is also supported.
- happy v2 exact SHA `8d4e56e356d0da3ab9260c448c986fcdb2ef42b66a0dfba11f7bd5dbfeb81b2e`
passed read-only decode/hash/production-parser checks:97 actual PTS,485 PNGs,
1,617,000 RGBA bytes, body SHA
`232943dc11698c47d4d38c281b08ea87cfcbbd11263b107da59f154a84f4230f`.
Its empty legalExitFrames is not changed or treated as a reviewed exit.
- Index rows declare reviewed legalExitFrames (actual frame indices), loopEdge,
A entry/exit anchors and exact runtimeManifest path/hash. Index paths resolve
under `avatar/a01-expression-action-v1/`; runtime file paths under each runtime.
- Every package requires a loop edge. `nativeLoop:true` is only for a reviewed
same-body last→0 loop: clip has that body's exact SHA/PTS/duration. Otherwise
deliver an actual silent loop bridge; runtime plays that bridge rather than wraps.
- neutral→happy and happy→neutral require actual silent bridge clip metadata,
fromFrame/fromPtsUs and toFrame/toPtsUs bound to each own body. Frame0 exits
are allowed only with reviewed index legalExitFrames; target entry is preroll-
decoded and composed before the bridge reveals, regardless of different N/fps.
- For each later dance, supply sourcePackageId/returnPackageId equal to fallback,
sourceFrame/sourcePtsUs and returnFrame/returnPtsUs exact bindings. SourceFrame
must be a declared legal exit. The complete clip includes the reviewed departure
from that source and return to that target A frame, with actual PTS/duration,
hasAudio:true, measured audioEndUs, no TALK/singing and seam/music evidence.
- Supply full index bytes SHA, all referenced files plus SHA/bytes, preview paths
and Pi's independent exact index approval. A runtime-only SHA is not the index pin.
Do not fabricate bridges, exits, audio, naturalness or dance capability to fill gaps.