Add chirp-bin watermark decoder

This commit is contained in:
Meta Vens 2026-05-22 19:50:02 +01:00
commit d79bae17bb
8 changed files with 688 additions and 25 deletions

View file

@ -56,3 +56,4 @@
{"ts": "2026-05-22T19:08:10+01:00", "type": "implementation", "status": "ok", "note": "Renamed the public no-chirp mode to passive and started the real hybrid sync machine. Added MimirPassiveAudioSynchronizationEstimator using PHAT-weighted cross-spectrum delay estimation over loopback/program audio; MimirAudioSynchronizationAnalyzer now reports passive evidence in passive/hybrid modes and falls back to chirplet anchors when hybrid passive confidence is weak. Hybrid runtime emission now queues short active pilot chunks only while passive confidence stays below threshold. dotnet build, passive sync self-test, and chirplet self-test passed."}
{"ts": "2026-05-22T19:08:56+01:00", "type": "verification", "status": "partial", "note": "Passive live smoke with MIMIR_AUDIO_SYNC_MODE=passive and config/mimir-runtime.probes.example.json emitted no calibration audio and produced loopback/program-audio reports: Focusrite delaySamples=6653 confidence=0.805, Kiyo Pro delaySamples=6804 confidence=0.227, USB Camera 0 delaySamples=-882 confidence=1.000 over 88200 compared 44.1k samples. This proves the passive path can lock on real loopback/music, but the negative Eye delay needs timestamp/window-sign inspection before driving an actuator."}
{"ts": "2026-05-22T19:33:21+01:00", "type": "verification", "status": "ok", "note": "Fixed passive sync confidence bug. Negative passive lags now produce status=passive-negative-lag with confidence=0, single-window passive confidence is capped at 0.85, and hub invalidates cached reports/state for negative-lag traces. Passive self-test now proves both positive delay recovery and reversed-input zero confidence. A 14s live passive smoke showed negative Focusrite evidence at confidence 0 without leaving a report/state, while positive passive reports stayed capped at 0.85."}
{"ts": "2026-05-22T19:49:43+01:00", "type": "implementation", "status": "partial", "note": "Built the first chirp-bin active watermark machine. MimirChirpBinTimeline renders a fixed-slope/window 32-bin chirp codebook and decodes with one dechirp plus fixed Goertzel bin scoring, then feeds de Bruijn triplet anchors and clock fitting. Hybrid fallback now renders/decodes chirp-bin evidence instead of the old dense chirplet matcher. Synthetic --chirp-bin-self-test passed with 23 frames, 21 anchors, 48000 Hz clock, and zero MAE; old --chirplet-self-test still passed. A real hybrid app run emitted chirp-bin batches, but the current probe config's 30s capture limit left loopback/mic windows stale before acoustic chirp-bin reports could be proven."}

View file

@ -102,6 +102,11 @@ accepted_design:
windows before any watermark is needed. Negative passive lags are
contradictory evidence and carry zero confidence; single-window passive
confidence is capped below certainty until repeated state earns it.
`MimirChirpBinTimeline` is the active hybrid watermark path: one fixed chirp
slope/window, 32 symbol frequency bins, dechirp plus fixed Goertzel bin
scoring, then the existing de Bruijn triplet anchor and clock-fit machine.
The synthetic proof is `dotnet run --project
.\src\Mimir.BufferSmoke\Mimir.BufferSmoke.csproj -- --chirp-bin-self-test`.
- `IMimirVideoCaptureDriver` and `MimirVideoCaptureDriverSource` are the live
seam for Leap, Media Foundation, DirectShow, libusb, LeapC, or shared
texture capture.