Build chirp-bin physical calibration model

This commit is contained in:
Meta Vens 2026-05-23 20:22:01 +01:00
commit 488fda5362
18 changed files with 3073 additions and 97 deletions

View file

@ -111,12 +111,13 @@ scheduled-waveform correlation for standalone source-offset refinement. Pairwise
sync compares matched anchors first, then only accepts independent clock-fit
offsets inside the live latency horizon so period aliases do not become absurd
reports. Each classified chirp carries the full dechirped bin-energy surface,
and decodes aggregate that into a `MimirChirpBinCalibrationProfile` per source
with frames, anchors, clock confidence, anchor error, usable band count, and
strongest bins. The analyzer keeps those profiles even when no timing report is
accepted, so a physical mic path can fail synchronization while still teaching
the next decoder which bands survived. Reports/states expose `delayUs` next to
fractional sample delay.
and decodes aggregate that into a `MimirChirpBinCalibrationModel` with measured
usable bands, expected-symbol versus observed-bin confusion observations,
timing residuals, delay hypotheses, phase summaries, and an adaptive codebook
plan. The analyzer keeps raw profiles even when no timing report is accepted,
and the active decoder can consume a persisted model for learned response
weighting, first-order group-delay correction, and global delay-hypothesis
seeding. Reports/states expose `delayUs` next to fractional sample delay.
`Mimir.BufferSmoke
--chirp-only-sync-self-test --sample-rate 192000` and `--hybrid-sync-self-test
--sample-rate 192000` both recover a 1269.5-sample synthetic delay with printed
@ -158,7 +159,13 @@ evidence; Starfire still owns the heavy soundfield and sensor-fusion work.
The ASIO probe can now play raw mono Float32 timeline audio through the
Focusrite outputs while capturing every ASIO input as raw interleaved Float32.
`Mimir.BufferSmoke --analyze-asio-f32` feeds those captured channels into the
same runtime active analyzer. A real 192 kHz chirp-bin Scarlett artifact decoded
same runtime active analyzer. `--calibrate-chirp-bin-asio-f32` computes and
persists the response/confusion/delay model, and `--analyze-asio-f32
--calibration ...` loads it into the active decoder. The ASIO worker also
supports `--emit-json-blocks`, so Focusrite ASIO callbacks can feed
sample-bearing `audio-block` events into `Mimir.Runtime` continuously through
the existing frame-event adapter while the native ABI cut is pending. A real
192 kHz chirp-bin Scarlett artifact decoded
`Loopback 1 -> Loopback 2` at exactly `0.000 us` with 12 matched anchors and
0.999 confidence. The same analyzer now prints calibration profiles for
decoded sources. Physical input 1 still fails pairwise timing in the stored

View file

@ -90,8 +90,11 @@ Get-Content .\state\evidence.jsonl -Tail 8
correlation for final fractional delay. It also supports standalone source
offset recovery from schedule/codebook state, which is the Raven/phone shape.
Each classified chirp carries the full dechirped bin-energy surface; sync
reports expose those bands, and `MimirChirpBinCalibrationProfile` preserves
per-source calibration evidence even when timing is rejected.
reports expose those bands, and `MimirChirpBinCalibrationModel` preserves
measured usable bands, response/confusion observations, timing residuals,
delay hypotheses, phase summaries, and adaptive codebook plans. The active
decoder can load the model for learned weighting, first-order group-delay
correction, and global delay-hypothesis seeds.
`Mimir.BufferSmoke
--chirp-only-sync-self-test --sample-rate 192000` and
`--hybrid-sync-self-test --sample-rate 192000` both recover a 1269.5-sample
@ -119,20 +122,22 @@ Get-Content .\state\evidence.jsonl -Tail 8
comparison and is now diagnostic only. A real Scarlett chirp-bin artifact run
at 192 kHz decoded `Loopback 1 -> Loopback 2` at `0.000 us` delay with 12
matched anchors and 0.999 confidence in the normal active analyzer. Physical
inputs still do not earn accepted timing against loopback, but the active
analyzer now prints calibration profiles for decoded channels. In the stored
artifact, physical input 1 produced 14 frames, 12 anchors, 0.865 clock
confidence, and a different strongest-bin profile while failing pairwise
timing. Acoustic robustness is still open, but failed timing now leaves
response evidence.
inputs still do not earn accepted timing against loopback, but
`--calibrate-chirp-bin-asio-f32` now persists a real response/confusion/delay
model and `--analyze-asio-f32 --calibration ...` consumes it. In the stored
artifact, physical input 1 produced two reliable symbols and a different
strongest-bin profile while failing pairwise timing. The ASIO native worker
also supports `--emit-json-blocks` so `Mimir.Runtime` can ingest Focusrite ASIO
callbacks continuously through the frame-event adapter. Acoustic robustness is
still open, but failed timing now leaves response evidence.
- Raven also has a 192 kHz loopback-capable Scarlett for co-streamer/game timing
evidence. Do not move the heavy soundfield or sensor-fusion workload there.
## Immediate Re-entry Instruction
Use the chirp-bin calibration profiles from real microphones to tune the active
codebook/bands/weighting, then feed Scarlett ASIO callbacks into `Mimir.Runtime`
and turn decoded clock fits into the SRO/fractional-delay actuator. Keep
loopback as timing authority. Do not call synchronization analysis from
UI/telemetry readouts. Do not restore deleted script infrastructure because a
stale doc once missed it.
Use the chirp-bin calibration models from real microphones to tune the active
codebook/bands/weighting, then replace the ASIO JSON-block process bridge with
a native ABI callback source and turn decoded clock fits into the
SRO/fractional-delay actuator. Keep loopback as timing authority. Do not call
synchronization analysis from UI/telemetry readouts. Do not restore deleted
script infrastructure because a stale doc once missed it.