feat: validate per-body mouth timelines and reviewed conversation routes

This commit is contained in:
zenord
2026-10-13 01:23:43 +08:00
parent 4358fc9cae
commit 4ead34a944
17 changed files with 646 additions and 61 deletions
+45 -4
View File
@@ -14,15 +14,18 @@ Self-authored approved/status fields never enable runtime capabilities.
Each conversation package: unique `id`, `emotion:neutral|happy|sad`,
`visualIntensity:0|1`, `mouthBodySha256`, `runtimeManifest:{path,sha256}` referencing runtime04 format
(continuous body + own 97 PTS registered frames × five RGBA aperture levels,
(continuous body + own actual N PTS registered frames × five RGBA aperture levels,
own curves/anchors/coordinates). Body SHA, frame count and decoded PTS bind every
mouth track to that exact body; no cross-body patches/masks/coordinates reuse.
Happy/sad are slightly only, including model intensity2. Body is silent.
No layer means whole-package fallback, never a neutral mouth over another body.
Provide 0.9/1.1/1.2 aperture previews; Pi chooses before import.
Pi selected **1.1 source pixels for the candidate**, based on fixed comparisons;
dynamic naturalness review is still pending. Do not treat a numeric gap as approval.
Edges: `id`, `from`, `to`, `fromAnchor`, `toAnchor`, `fromFrame`, `toFrame`,
`clip:{path,sha256,width,height,frameCount,ptsUs,durationUs,hasAudio:false}`.
`clip:{path,sha256,width,height,frameCount,ptsUs,durationUs,fpsNumerator,fpsDenominator,hasAudio:false}`.
Edges also bind `fromPtsUs` and `toPtsUs` to the exact source/target body frame;
`fromFrame` must be in that source package's `legalExitFrames`.
Each package declares `entryAnchor`, `exitAnchor`, `legalExitFrames`, `loopEdge`.
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
@@ -58,6 +61,44 @@ camera cues are independent and never select these role packages. Production
runtime04 parser: `app/src/main/java/com/gorios/lanvoice/avatar/ContinuousAvatarManifest.kt`;
v2 index parser: `app/src/main/java/com/gorios/lanvoice/avatar/EmotionActionManifest.kt`.
Each package should use `packId:a01-expression-action-v1-<packageId>-runtime-04`;
runtime04 body/patchFormat/patches/mouthStates/stateRouting field shapes stay intact.
New per-package runtime manifests use **schemaVersion:2**; only the old neutral
runtime03/04 schemaVersion1 retains its fixed97@24 constraints. Each new body's
`frameCount:N`, `durationUs`, `fpsNumerator/fpsDenominator`, **`ptsUs:[actual decoded
presentation timestamps]`** are mandatory. No truncation/padding to97, no neutral
track reuse. Counts121/49 and rational frame rates are supported independently.
Current GLES shape remains480×848 (new shapes require renderer extension).
N is bounded2..720, fps1..60, duration0.1..30s; body PTS starts0, strictly increases,
remains below duration and agrees with measured duration/nominal fps within one
nominal frame. Nonuniform actual PTS is accepted within two nominal frame intervals.
Machine gate must compare decoded PTS/duration to declarations, not infer PTS.
`patchFormat.bodySha256` must equal `body.sha256`; `patches` has exactlyN entries,
each `frameIndex:i`, `ptsUs:body.ptsUs[i]`, own coordinates/mask and five independent
level paths/hashes. Patch format remains straight RGBA8, [0,.25,.5,.75,1]; nearest
level, nonzero opacity1, zero bypass. Each patch≤128×128, totalRGBA≤8MB/runtime;
all packages combined≤32MB, ≤12packages. These are admission bounds, not GPU proof.
Each of the five mouth states supplies own actual `ptsUs`, `frameCount`, fps ratio,
`durationMs` (100..1000), alpha values and A/B anchors; curve timing no longer
assumes24fps. Runtime04 mouthStates/stateRouting names and anchor rules stay intact.
Entry/return bridges carry actual decoded frame PTS; `audioEndUs` records measured
last audio timestamp, completion also waits actual media stop and restored A.
Current asset snapshot: happy/sad001 sources each actually97 frames; sad002 must
be measured independently. 121/49 are compatibility test counts, not a claim about
those files. The happy-01 draft hash
`518865589fcff36259b864226cdc9651f742d6f56f3b58eeb98f241ef03d48e3`
still used schema1/`a01-slight-happy-01`/`body.framePTSUs` at the read-only check;
it is rejected, not silently relabeled or modified. Export schema2, packId
`a01-expression-action-v1-happy-01-runtime-04`, `body.ptsUs`,
`patchFormat.bodySha256`, and each mouth state's `ptsUs`. Use the same format for
sad/neutral, independently measured. A frame0 enter bridge is legal only when
its source declares frame0 in `legalExitFrames`; do not inherit old last-frame exits.
Read-only handoff check (new evidence file, does not import/activate):
`python3 scripts/check-avatar-runtime.py --manifest <runtime>/manifest.json --sha256 <exact-candidate-sha> --output logs/action-emotion/<new-evidence>.json`.
It checks file hashes, complete video decode, actual PTS/duration/fps, PNG RGBA
shape/cache and production Kotlin admission. It rejects concurrent file drift.
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.