Files
baji-vc/docs/AVATAR_NATURAL_ENGINEERING_061.md
T
zenord 9ea5eb31c1 feat: deliver clean avatar home in 0.6.2 UI debug candidate
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.
2026-10-12 22:19:56 +08:00

49 lines
5.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 0.6.1-natural-dev / code13 自然工程候选
本阶段授权 continuous body + registered local mouth layer Android 集成。与 code12 controlled01 五 wholeframe clip 的方法不同,仍是工程候选,不认证最终自然度或 ≤1s 感知响应。后端、模型/TTS 参数、相机算法不变;没有新 AI 付费、安装或传感器采集。
## 精确素材与范围
runtime-03 manifest SHA256:`87ad2b2ad0e96fe64943692da363c856939ad4aad57073c589d53130c2f2073c`。
来源 `.runtime/avatar-imports/a01-neutral-graph-v1/runtime-03/`,导出自 natural03。body SHA `177dbc0ab809e3c9c684899ffbd9cf3a2c357973c7037134f5d79e4e6cdfc762`,97帧、480×848、24fps、4041667us、静音 H264。97张局部嘴 PNG 为 straight RGBA8,注册/tone/空间羽化已离线烘焙,无实时 SSD。
保留 manifest publishApproval=false、safeTransitions pending、approvedEdges=[]、naturalQuality/deviceTest pending。仅 `-PavatarNatural=true -PnaturalManifestSha=<exact SHA>` debug 构建准入;release 关闭 runtime override,生产图 allowlist 仍为空。旧 controlled01 manifest/素材/code12 APK 保留原哈希,natural02/03 失败或审查视频不作为 runtime 片段打包。
## 实装路径
ContinuousBodyRenderer 使用一个 MediaCodec → OES SurfaceTexture → GLES2/EGL window。每次仅释放一个解码输出;updateTexImage 后核 SurfaceTexture timestamp 与 decoder PTS,ContinuousFrameClock 校验0..96连续索引及 wrap。按已消费 index 选 patch,body 和局部嘴层同一 draw/swap 完成,不独立 Compose overlay,不取 MediaPlayer position 猜相位。swap 成功仅表示合成 buffer 提交,不证明物理屏幕/用户感知时刻。
body 持续前进,嘴相位独立 IDLE→OPENING→TALKING→STOPPING→IDLE;250ms opening/end、500ms talk 单元。持续 talk 在合法曲线端点选择 talk1/2,有另一合法变体时不连续重复;latest generation/revision 覆盖旧请求,abort 立即由既有音频实现停止声音,嘴完成当前短单元和 closing;opening 反转可完成后 closing,stop 中恢复先完成 closing→idle,再 opening。mouth 变化不 flush/seek body。只有完整97帧 wrap 才 flush/seek0、ordinal+1。
PNG 启动时97张小图解码并缓存 GL texture,总 RGBA 上限8MB(本包约341KB),不每帧解码/分配全身 bitmap。Bitmap getPixels 取得 straight ARGB 后显式 RGBA byte 上传,shader `out=body*(1-g*a)+patchRGB*(g*a)`,g=0 原 body;不二次乘空间 alpha。body 和 patch 使用同一 top-left480×848坐标与白底 Fit,不裁头脚或拉伸。GLES highp 失败、PTS错配、早EOS、超时或 surface问题均回原静态兜底并记录限频 enum,无超时猜 patch、无音频等待。后台释放 decoder/EGL/GL资源并 fence旧callback;前台重新初始 body/neutral mouth。
## 复现与工程证据
```sh
python3 scripts/package-avatar-natural.py --import-only
python3 scripts/check-reply-regressions.py --suite avatar --runtime-manifest .runtime/avatar-imports/a01-neutral-graph-v1/runtime-03/manifest.json > logs/avatar-natural-061/actual-manifest-tests.txt 2>&1
./scripts/check-avatar-regressions.sh
/home/ubuntu/miniconda3/envs/gori-speech/bin/python gateway/scripts/check-archive.py --vad-model /home/ubuntu/miniconda3/envs/gori-speech/lib/python3.12/site-packages/silero_vad/data/silero_vad.onnx > logs/avatar-safe-061/gateway-tests.txt 2>&1
python3 scripts/package-avatar-natural.py
```
导入逐项核97 PNG/body SHA、尺寸/alpha/bounds、所有 body PTS/CFR和完整解码;实际 manifest 另外编译给 production Kotlin parser 验证。独立 CPU 验证97帧 alpha0 恒等及 alpha.5/1 straight/premul source-over代数;不是 GPU 像素认证。保持已有9 JVM entry points+74 gateway,全编译/验签/badging/精确APK素材清单/未压缩 MP4/HTTP SHA。真实 ContinuousBodyRenderer 也在确定性 Android MediaCodec/EGL doubles 下测帧索引、同次draw/swap、loop、停止时body连续、timestamp/swap/size/timeout失败和释放;doubles不证明硬件decoder/GLES兼容。
源码/素材/交付 checkpoint 与报告见 ignored `logs/avatar-natural-061/`;APK `artifacts/lan-voice-v061-natural-engineering-arm64-debug.apk`,不覆盖 code12/V060/052/051、不提交肖像 Git、不 commit/push final。
## 设备离线验证
```sh
adb -s 0123456789ABCDEF install -r lan-voice-v061-natural-engineering-arm64-debug.apk
adb -s 0123456789ABCDEF shell am force-stop com.gorios.lanvoice
adb -s 0123456789ABCDEF shell am start -W -n com.gorios.lanvoice/.MainActivity --ez avatar_offline_preview true
```
extra 保留相同精确名;此入口在 VoiceSession/AudioOutputGate/ExpressionController 构建前返回,完全不连WS、不请求权限、不录音不开相机。20s synthetic intent trace+Idle/Talk/Abort/Trace按钮走真实连续body renderer。观察嘴切换时 body/眼睛是否连续,97frame wrap、贴层上下方向/位置、错帧、首帧/黑帧、后台恢复/旋转/Fit、decoder/GLES错误fallback。
正常桌面启动仍为 foreground自动连接→真实HELLO→MIC/CAMERA权限;已有权限会直接对话和相机分析,请协调首次使用离线命令。拒相机不阻断音频;face-cue分享独立默认off,无背景服务。
## 未测边界
body loop seam 自身、头部旋转/缩放使 translation-only嘴层失配、tone/唇影/纹理接缝、Bitmap premul量化、GPU颜色转换/采样、设备短时/长期资源/温度、权限系统弹窗及硬件物理显示时间均待真机。原素材 registration0撞界不代表贴合全通过。authored alpha125–500ms不是 perceived/device latency;250/500ms曲线参数不构成 ≤1s SLA。用户相机人脸仍独立验收,肖像商业权利unverified。