Files
pyxis/lib
torlando-techandClaude Opus 4.7 e92ddcf2f3 test(lxst): inject 3-formant voice signal instead of pure tone
Codec2-3200 is a SPEECH codec — pure-tone round-trip retains only
~12% of input RMS. The 1kHz-sine variant of the LXST QoS test
worked but tested the codec on its worst-case input.

Switch I2SCapture::setInjectSine to generate a synthesized voice-
like signal instead of a pure sine: F1 at the freq arg (default
730Hz, "ah" formant), F2 at 1.5·F1, F3 at 3.3·F1, all summed with
weights 0.55 / 0.30 / 0.15, modulated by a 120Hz amplitude envelope
that emulates glottal pulses. Phase-continuous so the encoder never
sees a discontinuity.

Codec2 retains far more energy on this content (~5400 RMS vs the
~1900 the sine produced) — same gate, much wider quality margin.

Validated end-to-end:
  pyxis_rms=4378  bot_rms=5438  decode_fail=0+0  PASS

The LXST harness drives this via the same T:CALL_INJECT command
(API unchanged); only the in-firmware generator changed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 10:05:23 -04:00
..