# hearing, step 1: what was tuned on the development data

written 2026-10-23, before any test. the rules are in `docs/hearing-step1.md` (frozen 02:47:26 bst, sha256 `001f8186a00c5c13b0d74b86c40ba41882e71c2ae608e0c75e164fa7fb55c676`). everything below was looked at on the development data only: minutes 0 to 5 of the 10-01 memo, and the kept sound of 10-23 from 00:58 to 01:30 (which holds one stretch of voice, too thin to sort, so the memo minutes did all the work). times are bst.

## the ruler (the borrowed aligner, a measuring tool only)

- two bugs fixed in the aligner before anything was scored: it put every character one frame (20 ms) late, and its "nothing said yet" column was one frame off.
- then measured against loudness, never against the surprise: at the 128 word starts that follow a pause, the sound crosses half-way up 135 ms before the aligner's start; at the 128 word ends before a pause, it crosses half-way down 45 ms before the aligner's end. so every word time is moved before scoring, test data included: starts 135 ms earlier, ends 45 ms earlier.
- the first transcript of 01:30 to 02:10, made in one 40 minute pass, got stuck repeating one line for every segment after 01:35, so it is not used. the talks were transcribed again as four short clips with no carried context (`truth/tools/talks.py`): 01:32:05 for 30 s, 01:35:00 for 40 s, 01:41:10 for 40 s, 01:45:20 for 15 s. 10 segments: 7 are his three talks, 3 are short bits that could be him, a video or the transcriber guessing ("difficult conversations", "thank you", "i don't know"), so they are unsure and left out.
- rule 2 labels, made from those segments before any sorting of 01:30 to 02:10 was run (the stretches were found with sorting switched off): 11 stretches pass the voice rule in that window; 8 him, 0 other, 3 left out. `truth/kept-stretch-labels.json`.
- so rule 2 will not be scored (it needs 10 of each). the iphone videos were loud (70% of the readings over the hiss) but almost never steady voice through the speakers (0.6% of readings voiced), so the voice rule let almost none of them through.

## voice places

- as first built, the 37 stretches of his voice in the memo minutes made 36 places. the cause: readings 10 ms apart are near copies of each other, so the test counted the same evidence 5 to 10 times and split on small differences.
- tried on the memo minutes: the outline's first 12 numbers plus pitch (13) or first 3 plus pitch (4), full or diagonal spread, readings every 10, 50 or 100 ms. at 10 ms every shape split (31 to 36 places). at 50 ms with 13 numbers and full spread (the shape as written): 32 stretches sorted, 2 places, 31 of them (97%) in one place, 5 too thin to sort. at 100 ms more stretches were too thin to sort.
- chosen: every 5th voiced reading (50 ms apart) goes into a stretch and its place, 13 numbers, full spread, weight 1 as frozen. the made-up two voices check still puts them in two places.

## the bet

- unchanged from what the rules describe: loudness and the outline's 48 numbers, next 10 ms from the last 30 ms, recursive least squares forgetting over 10 s, surprise = how far off (the log spectrum distance) against its own 10 s average.
- rule 3 on the memo minutes 0 to 5 with the moved ruler: 457 boundaries, a boundary beats a moment inside a word 54.7% of the time, the placebo 48.6%: 6.1 points. that would fail. it was not tuned to make it pass, so the test is not fit to these minutes. a fail on rule 3 is the expected result.

## cost

- the e's are found 20 times a second, for showing them; finding all 48 every 10 ms cost 3 to 5.6% of one core on its own. the bottom bet, the live bet and the places still run every 10 ms.
- offline, single thread: 1.41% of one core on 3 minutes of kept sound at 48 khz with the e's, 0.59% on the memo at 24 khz. the live hour is measured after it is wired in.

## how the test runs (no choices left)

- rule 1: `bin/estool kept <ears dir>/2026-10-23 1792715400000 1792717800000 runs/test-0130` in `~/Code/Foundation-lanes/ears-keep`, every minute file that overlaps 01:30 to 02:10.
- rule 2 and the kept part of rule 3: one continuous run from 00:58 to 02:10, `bin/estool kept <ears dir>/2026-10-23 1792713480000 1792717800000 runs/test-kept --no-lossless`.
- the memo part of rule 3: `bin/estool file <memo> runs/test-memo 0 900`, scored on minutes 5 to 15 only.
- rule 3 score: `score3.py` with the kept talks first (segments 0, 2, 3, 4, 6, 7, 8, grouped by clip), then the memo minutes 5 to 15 grouped by the minute of each word's middle; one random generator with seed 1 drawn in that order, for each boundary first the moment inside a word (uniform over the inside parts of the group's words), then the placebo time.

## files, frozen with this one

- `ears/es.hpp` 714d80be783fcbd8a29327d3103f8ba4c8451fd2c02c4a0ea2bb786c990ab1ca
- `ears/estool.cpp` 3390ee23951ac635787b290516400119ad750d7a164768ec1f4738ada34534f3
- `score3.py` cb5665e6e2c034193a8201f58d58acf74cc7be05e1b272f4c21f2bc9e6edc596
- `truth/tools/align.py` d42df374d6f82c56953d2dde2706b6a0e5dec8d5e43dbfb86017503b781c614d
- `truth/tools/talks.py` 9da149ef3d22b8e377012eab3ec7032b18187fe22865ae301e97085ed8a3b106
- `truth/kept-stretch-labels.json` 4256b6f0525d78f63ba002e0baf916b3ec9eb86ad0059227d2d0f3d9db05bd14
- `truth/kept-talks.words.json` 889e36def5980474c8774284f01db7ee7143ba248f53656b463a74fbb3a84af8
- `truth/memo1001-0-15.words.json` 67b2ab747ab06e0b154be26c3be9c4b0b069f1e75d722ee269dfa8f5720b8398

(paths under `~/Code/Foundation-lanes/ears-keep/`.)
