Replace bioacoustic triplets with speaker words
This commit is contained in:
parent
1f385002a7
commit
4af29802c8
11 changed files with 212 additions and 271 deletions
|
|
@ -69,10 +69,10 @@ one attractive correlation peak.
|
|||
|
||||
The active calibration path is deliberately receiver-cheap in both `chirp-only`
|
||||
and `hybrid`. `MimirBioacousticTimeline` is the live runtime witness: it emits
|
||||
low-gain log-frequency motifs made from short formant-rich syllables, rhythm
|
||||
offsets, and a de Bruijn triplet grammar. Acquisition is an energy proposal pass
|
||||
plus bounded motif matching; timeline placement is the same code-valid triplet
|
||||
trellis, and a constrained local waveform correlation around the decoded delay
|
||||
low-gain log-frequency words made from short formant-rich syllables, rhythm
|
||||
offsets, and speaker-specific variants. Acquisition is an energy proposal pass
|
||||
plus bounded motif matching; timeline placement comes from direct word identity,
|
||||
and a constrained local waveform correlation around the decoded delay
|
||||
provides the final fractional offset. The decoder keeps per-band response
|
||||
evidence for each detected motif so the same stream can calibrate timing and the
|
||||
speaker/room/mic transfer function.
|
||||
|
|
@ -95,8 +95,8 @@ sequence order so the timeline remains unique without pretending dead bands
|
|||
still carry code.
|
||||
The synthetic invariant is
|
||||
`dotnet run --project .\src\Mimir.BufferSmoke\Mimir.BufferSmoke.csproj -- --bioacoustic-self-test`;
|
||||
it renders the bioacoustic timeline, decodes motif anchors, and requires
|
||||
code-valid triplets plus a stable source clock. The standalone invariant is
|
||||
it renders the bioacoustic timeline, decodes direct word anchors, and requires a
|
||||
stable source clock. The standalone invariant is
|
||||
`--standalone-bioacoustic-self-test --sample-rate 48000 --delay-samples 1269.5`;
|
||||
it proves that a delayed receiver can recover canonical source time from the
|
||||
known codebook and schedule alone. `chirp-only` emits this witness continuously;
|
||||
|
|
@ -156,7 +156,7 @@ current studio-monitor-to-Scarlett-mic acoustic path was already weak by
|
|||
unproven until a measured transducer/mic path earns it.
|
||||
|
||||
The active bioacoustic timing proof now runs in memory through the same runtime
|
||||
analyzer path. `--bioacoustic-self-test` proves code-valid motif anchors,
|
||||
analyzer path. `--bioacoustic-self-test` proves direct word anchors,
|
||||
`--standalone-bioacoustic-self-test --sample-rate 48000 --delay-samples 1269.5`
|
||||
proves a receiver can recover canonical source time from delayed audio alone,
|
||||
and `--chirp-only-sync-self-test --sample-rate 48000` recovers a 317.375-sample
|
||||
|
|
@ -169,10 +169,10 @@ through `asio-ch3`.
|
|||
The full probe runtime config now enables sample-bearing blocks for every local
|
||||
audio source. `MimirBioacousticTimeline` owns the emitted calibration stream and
|
||||
the motif-matching shape used to analyze it. The default timeline is a
|
||||
deterministic order-3 de Bruijn symbol sequence over 16 log-frequency motifs.
|
||||
Any three consecutive correctly detected motifs identify the event index inside
|
||||
the current operating horizon, so a receiver can place its audio window on the
|
||||
canonical timeline without being handed Mimir's runtime clock. Mimir queues
|
||||
deterministic set of self-identifying log-frequency words with separate left and
|
||||
right speaker variants. Any correctly detected word identifies the event index
|
||||
inside the current operating horizon, so a receiver can place its audio window
|
||||
on the canonical timeline without being handed Mimir's runtime clock. Mimir queues
|
||||
half-second PCM segments ahead of the audio cursor. Each motif is a short phrase
|
||||
of formant-rich syllables with log-frequency contour and rhythm offsets, so the
|
||||
code is carried by both spectral shape and timing.
|
||||
|
|
@ -180,10 +180,10 @@ code is carried by both spectral shape and timing.
|
|||
The intended decoder is a compact constrained motif transform, not a generic
|
||||
time-frequency explorer and not an outlier filter around bad guesses. Mimir owns
|
||||
the emitter, so the receiver projects each mic stream against the known motif
|
||||
dictionary, produces transform frames with multiple symbol candidates, and
|
||||
scores candidate triplets through the de Bruijn map. A triplet only becomes a
|
||||
canonical timeline anchor when its symbol likelihoods, measured inter-motif
|
||||
gaps, and neighboring anchors agree on one local sample clock. A decoded anchor
|
||||
dictionary, produces transform frames with multiple word candidates, and maps
|
||||
the best coherent word identities directly to canonical events. A word becomes a
|
||||
canonical timeline anchor when its motif likelihood and neighboring anchors
|
||||
agree on one local sample clock. A decoded anchor
|
||||
means observed sample offset `S` corresponds to emitted event time `T`. A stream
|
||||
of anchors fits the source clock directly:
|
||||
|
||||
|
|
@ -193,8 +193,8 @@ observed_sample = source_offset + canonical_seconds * effective_sample_rate
|
|||
|
||||
Delay and sampling-rate offset are derived by comparing the loopback clock fit
|
||||
to each mic clock fit over common canonical time. The state tracker is not
|
||||
allowed to launder invalid codewords into plausible timing. If a stream cannot
|
||||
produce at least three matched canonical anchors, it has not decoded timing for
|
||||
allowed to launder invalid words into plausible timing. If a stream cannot
|
||||
produce at least one matched canonical anchor, it has not decoded timing for
|
||||
that window. Reports carry rounded integer delay, fractional delay, and the
|
||||
count/confidence of timeline-symbol anchors used to derive the report.
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ flowchart TD
|
|||
E --> G["matched chirplet traces"]
|
||||
F --> G
|
||||
G --> H["symbol likelihood events"]
|
||||
H --> L["triplet timeline anchors"]
|
||||
H --> L["timeline anchors"]
|
||||
L --> M["per-source clock fit"]
|
||||
M --> N["delay + SRO"]
|
||||
G --> I["per-source calibration profile"]
|
||||
|
|
|
|||
|
|
@ -7,13 +7,14 @@ That shape proved the math, but it is the wrong animal for a room.
|
|||
|
||||
Mimir now treats active acoustic sync as a low-gain bioacoustic language: short
|
||||
birdsong-like motifs whose identity survives through contour, log-frequency
|
||||
position, spectral envelope, rhythm, and phrase order. The receiver should not
|
||||
position, spectral envelope, rhythm, and speaker-specific timbre. The receiver should not
|
||||
ask only "which bin fired?" It should ask:
|
||||
|
||||
```text
|
||||
which motif contour did I hear?
|
||||
where does this motif phrase sit in the canonical grammar?
|
||||
what delay and clock fit make the whole phrase coherent?
|
||||
which self-identifying word did that contour encode?
|
||||
which speaker vocabulary emitted it?
|
||||
what delay and clock fit make the heard words coherent?
|
||||
what did this room/mic path do to the spectrum?
|
||||
```
|
||||
|
||||
|
|
@ -21,14 +22,18 @@ what did this room/mic path do to the spectrum?
|
|||
|
||||
`MimirBioacousticTimeline` is the current active runtime watermark.
|
||||
|
||||
- 16 log-spaced motif symbols.
|
||||
- Each motif contains three short syllables.
|
||||
- 128 self-identifying word positions, each with a left-speaker and
|
||||
right-speaker variant.
|
||||
- Each word contains four short syllables.
|
||||
- Each syllable carries a log-frequency glide plus formant-like partials.
|
||||
- Motif rhythm varies by symbol group.
|
||||
- The timeline is an order-3 de Bruijn grammar, so any three correctly decoded
|
||||
consecutive motifs identify canonical event position.
|
||||
- The decoder emits motif candidates, code-valid triplet anchors, a source
|
||||
clock fit, and per-band response evidence.
|
||||
- Motif rhythm, contour, syllable duration, root, and speaker tint vary by word.
|
||||
- No de Bruijn grammar is used in the active bioacoustic path. A word identifies
|
||||
its canonical event directly inside the current operating horizon.
|
||||
- The decoder emits motif candidates, direct word anchors, a source clock fit,
|
||||
and per-band response evidence.
|
||||
- Runtime emission sends the left vocabulary to the left speaker and the right
|
||||
vocabulary to the right speaker, so microphones can learn each side of the
|
||||
room separately.
|
||||
- The runtime active sync evidence kind is `bioacoustic`.
|
||||
|
||||
The old `MimirChirpBinTimeline` remains as a calibration/reference artifact
|
||||
|
|
@ -44,7 +49,7 @@ watermark target.
|
|||
- deterministic phrase schedule;
|
||||
- PCM rendering for active emission;
|
||||
- streaming motif scoring;
|
||||
- de Bruijn triplet anchor decoding;
|
||||
- direct word anchor decoding;
|
||||
- source clock fitting;
|
||||
- response-band evidence.
|
||||
|
||||
|
|
@ -65,8 +70,9 @@ Birdsong survives ugly channels because the information is redundant:
|
|||
- contour survives when absolute pitch shifts;
|
||||
- rhythm survives when frequency response is bad;
|
||||
- formant envelope survives when one band dies;
|
||||
- phrase grammar survives when individual syllables are weak;
|
||||
- repeated local structure gives the receiver more than one way to recover time.
|
||||
- speaker-specific variants expose room asymmetry;
|
||||
- repeated local structure gives the receiver more than one way to recover time
|
||||
and response.
|
||||
|
||||
That is the physical path Mimir needs. A phone mic, camera mic, Scarlett input,
|
||||
or network receiver should be able to recognize canonical time from a damaged
|
||||
|
|
@ -84,8 +90,8 @@ dotnet run --project .\src\Mimir.BufferSmoke\Mimir.BufferSmoke.csproj -- --chirp
|
|||
|
||||
Expected state:
|
||||
|
||||
- `--bioacoustic-self-test` recovers code-valid motif anchors across the
|
||||
canonical phrase.
|
||||
- `--bioacoustic-self-test` recovers direct word anchors across the canonical
|
||||
phrase.
|
||||
- `--standalone-bioacoustic-self-test` recovers delayed canonical source time
|
||||
from codebook/schedule state alone.
|
||||
- `--chirp-only-sync-self-test` reports `evidence=bioacoustic` and recovers
|
||||
|
|
@ -106,7 +112,7 @@ cut is a true streaming log-mel receiver:
|
|||
audio window
|
||||
-> log-mel / constant-Q evidence surface
|
||||
-> motif/formant/contour candidates
|
||||
-> phrase grammar decode
|
||||
-> direct word identity decode
|
||||
-> global delay and clock hypothesis
|
||||
-> path response model
|
||||
```
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ mode:
|
|||
|
||||
Active bioacoustic decode uses known codebook/schedule state. It proposes motif
|
||||
times from local energy, classifies log-frequency/formant symbols by bounded
|
||||
matched motif scoring, constrains candidates through de Bruijn code-valid
|
||||
triplets, fits a clock, and records band response evidence for calibration.
|
||||
matched motif scoring, maps self-identifying words directly to canonical events,
|
||||
fits a clock, and records band response evidence for calibration.
|
||||
|
||||
## Invariants
|
||||
|
||||
|
|
@ -810,10 +810,11 @@ Owns:
|
|||
|
||||
Core state:
|
||||
|
||||
- Sixteen log-spaced motif symbols.
|
||||
- Three short formant-rich syllables per motif.
|
||||
- A de Bruijn order-three schedule, so any valid motif triplet identifies one
|
||||
canonical timeline location.
|
||||
- 128 self-identifying word positions.
|
||||
- Left-speaker and right-speaker variants for each word.
|
||||
- Four short formant-rich syllables per word.
|
||||
- Direct word identity, so a valid word identifies one canonical timeline
|
||||
location in the current operating horizon.
|
||||
- Cached kernels by sample rate.
|
||||
|
||||
Blocks:
|
||||
|
|
@ -821,7 +822,7 @@ Blocks:
|
|||
- Motif/syllable records: `MimirBioacousticMotifDefinition` and
|
||||
`MimirBioacousticSyllable`.
|
||||
- `RenderSegmentMonoFloat`: renders one low-gain timeline segment.
|
||||
- `DecodeStreamWindow`: detects motif frames, decodes code-valid triplet
|
||||
- `DecodeStreamWindow`: detects motif frames, decodes direct word
|
||||
anchors, fits source clock, refines standalone source offset, and emits the
|
||||
shared `MimirChirpletStreamDecode` shape.
|
||||
- `EventForIndex` / `EventsOverlapping`: expose canonical schedule metadata.
|
||||
|
|
@ -829,14 +830,14 @@ Blocks:
|
|||
suppresses nearby duplicate motif hits.
|
||||
- `ClassifyAt`: scores a local candidate against the motif bank.
|
||||
- `ScoreMotif`: matched motif scoring with per-band response evidence.
|
||||
- `DecodeAnchors`: maps detected motif triplets back to canonical event indexes.
|
||||
- `DecodeAnchors`: maps detected words back to canonical event indexes.
|
||||
- `FitClock` and `RefineSourceOffset`: recover source timeline position and
|
||||
sub-frame offset from known codebook/schedule state.
|
||||
|
||||
Invariant:
|
||||
|
||||
- A receiver with only the codebook, schedule, and its local audio buffer can
|
||||
recover canonical time once it hears a code-valid motif triplet.
|
||||
recover canonical time once it hears a valid motif word.
|
||||
|
||||
## Stage 9: Chirp-Bin Reference Timeline
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ a named invariant that the native runtime cannot protect yet.
|
|||
hub, and prints the actual rolling buffers. Use `--require-samples` when an
|
||||
empty declared sensor buffer should fail the run. Use `--bioacoustic-self-test`
|
||||
to render the active motif timeline into memory and verify that the decoder
|
||||
recovers code-valid anchors. Use `--standalone-bioacoustic-self-test` to
|
||||
recovers direct word anchors. Use `--standalone-bioacoustic-self-test` to
|
||||
verify that a receiver with only the codebook/schedule can recover canonical
|
||||
source offset from delayed audio.
|
||||
- `native/probes/wasapi_audio_cadence` captures WASAPI mic or render-loopback
|
||||
|
|
@ -65,10 +65,11 @@ a named invariant that the native runtime cannot protect yet.
|
|||
capture raw interleaved Float32 ASIO input with `--record-f32-interleaved`.
|
||||
- `MimirBioacousticTimeline` owns the active runtime watermark described in
|
||||
[[bioacoustic-timeline-watermark|Bioacoustic Timeline Watermark]]. It renders
|
||||
a low-gain birdsong-like phrase language: 16 log-spaced motif symbols, three
|
||||
formant-rich syllables per motif, rhythm variation, and an order-3 de Bruijn
|
||||
grammar so any three correctly decoded consecutive motifs identify canonical
|
||||
timeline position. Runtime active sync now reports `evidence=bioacoustic`.
|
||||
a low-gain birdsong-like word language: 128 self-identifying word positions,
|
||||
left-speaker and right-speaker variants, four formant-rich syllables per word,
|
||||
rhythm variation, and direct word identity so a correctly decoded word
|
||||
identifies canonical timeline position. Runtime active sync now reports
|
||||
`evidence=bioacoustic`.
|
||||
- `MimirChirpletTimeline` owns the older structured chirplet calibration stream,
|
||||
PCM segment rendering, matched timing trace, and per-band response kernels.
|
||||
It remains a reference/diagnostic path.
|
||||
|
|
@ -81,8 +82,8 @@ a named invariant that the native runtime cannot protect yet.
|
|||
and clock coherence, and fits a per-source sample clock from those anchors.
|
||||
- `MimirAudioSynchronizationAnalyzer` ports the first live sync measurement:
|
||||
sample-bearing audio blocks are resampled into the Scarlett loopback timeline.
|
||||
The analyzer derives delay only from matched decoded triplet timeline anchors.
|
||||
A source without at least three matched anchors has no timing report for that
|
||||
The analyzer derives delay only from matched decoded timeline anchors.
|
||||
A source without at least one matched anchor has no timing report for that
|
||||
window. It accepts Float32, Int16, Int24, and Int32 PCM windows so ASIO/native
|
||||
capture can feed true interface formats without a pre-conversion shim.
|
||||
- `MimirAudioSynchronizationStateTracker` owns the first smoothed per-source
|
||||
|
|
@ -183,13 +184,14 @@ a named invariant that the native runtime cannot protect yet.
|
|||
2. Feed those drivers into `MimirVideoCaptureDriverSource` and prove sustained
|
||||
frame cadence in the rolling buffers.
|
||||
3. Use bioacoustic motif response profiles from real microphones to tune
|
||||
contour, formant, band, gain, and rhythm weighting without weakening the
|
||||
standalone codebook/schedule receiver invariant. Keep chirp-bin calibration
|
||||
artifacts as reference data, not the runtime target.
|
||||
contour, formant, band, gain, rhythm weighting, and left/right speaker
|
||||
separation without weakening the standalone word-identity receiver invariant.
|
||||
Keep chirp-bin calibration artifacts as reference data, not the runtime
|
||||
target.
|
||||
4. Add the synchronization actuator: drive a variable-rate resampler and
|
||||
fractional delay line per non-reference stream from the smoothed
|
||||
`MimirAudioSynchronizationState`. First, prove the bioacoustic motif decoder
|
||||
through real loopback and microphone paths so every correctly heard triplet
|
||||
through real loopback and microphone paths so every correctly heard word
|
||||
becomes a deterministic timeline anchor before the actuator moves samples.
|
||||
5. Prove the bioacoustic hybrid fallback through real loopback and microphones
|
||||
with probe durations long enough to keep loopback and mic windows live.
|
||||
|
|
|
|||
Loading…
Reference in a new issue