re: recover the .slb leading segment — mono, and scoped by measurement

to_xma_riffs now emits the leading headerless segment when it sits at a whole
number of XMA1 packets and carries a non-zero byte. VOICE_D_453 goes from a
0.14 s trailing fragment to a 45116-byte leading sub-wave that dominates it.

I withdrew this exact change earlier for two reasons. Both are now answered
rather than argued away:

* "It recovers no audio" -- it used the STEREO format. At two channels every
  bank yields exactly 1792 bytes, one frame, whatever its size. Mono yields up
  to 113x more.
* "It matches 1524 of 8021 RIFF-bearing entries" -- the byte-level reach is
  still 1524, but the audible reach is not. Across the 84 movie-bound banks
  the segment adds >1 s to exactly 7, the hokyu_*_H tankers on D_453/D_454 --
  precisely the broken ones -- and <=0.25 s to 66 of the rest. The largest
  non-resupply addition is S04A at +0.66 s on a 256 s movie.

The safety oracle is recorded with its limits: 8 of the 84 banks ALREADY
exceed their movie's duration before the change, by hundredths of a second,
so it cannot resolve differences at that scale. It establishes scoping, not
correctness. Callers clamp to the movie length regardless.

VOICE_D_451's all-zero leading region is skipped by the non-zero guard, so
the rule cannot prepend silence to a bank that does not need it. Pinned, as
is the packet arithmetic (n = 8, 1, 7, 22, 29) which has no tunable.

slb_disc, movie_subtitle_disc and movie_manifest_disc all still pass.

NOT verified by ear -- that needs a human.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PMRJjbxLqZtsb5Vb7KunPE
This commit is contained in:
Sylpheed RE agent
2026-08-26 00:37:06 +00:00
parent ea0eedda86
commit a32c00057e
4 changed files with 152 additions and 20 deletions

View File

@@ -1057,9 +1057,18 @@ premise was wrong.**
first `RIFF`. For the first three that discards only silence, so they looked
fine (2.8 / 1.6 / 2.2 s); for the last two it discards **the line itself**,
leaving 0.14 s and 0.43 s. One rule, two outcomes, depending on which segment
holds the speech. ▶️ The fix is now well-posed: emit the leading region **only
when it carries signal**, which also avoids the 1524-bank blast radius that
sank the earlier attempt.
holds the speech. **(same day) LANDED.** `to_xma_riffs` emits the leading segment
wrapped **mono** when it is a whole number of packets and carries a non-zero
byte. Both reasons the first attempt was withdrawn are answered: it used the
stereo format (mono yields up to 113× more), and while the byte-level reach is
still 1524 entries the **audible** reach is not — across the 84 movie-bound
banks it adds >1 s to exactly **7**, the `hokyu_*_H` tankers on
`VOICE_D_453`/`454`, and ≤0.25 s to 66 of the rest. ⚠️ The safety oracle is
weak and says so: **8 of the 84 already exceed their movie duration before the
change**, by hundredths of a second, so it establishes scoping rather than
correctness. Pinned by `tests/slb_leading_segment_disc.rs`, including that the
all-zero `VOICE_D_451` region stays skipped. ❔ Not verified by ear — that
needs a human.
***(2026-08-25) The `.slb` "multi-subwave" guess is REFUTED, and the voice
decoder is discarding up to 87 % of a bank.** The record table gives a
**direct** binding `hokyu_DS_s13A -> VOICE_D_452` where the corpus records the