Skip to content

16 kHz quality suite: rate-scaled config, measured thresholds, gtest filter fix#22

Merged
tap merged 1 commit into
mainfrom
claude/16khz-suite
Jun 12, 2026
Merged

16 kHz quality suite: rate-scaled config, measured thresholds, gtest filter fix#22
tap merged 1 commit into
mainfrom
claude/16khz-suite

Conversation

@tap

@tap tap commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Measured 16 kHz → 16 kHz quality coverage (the reference-microphone processing rate), with a finding that matters beyond the tests.

The finding: configuration must scale with the rate — including the servo

A literal port of the 48 k methodology measured a uniform ~32 dB deficit with a servo-FM signature. Cause: not just FilterSpec band edges but ServoConfig bandwidths are absolute Hz — at 16 kHz the slip beat sits at ppm·fs = 3.2 Hz instead of 9.6 Hz, costing (16/48)³ ≈ 28.6 dB of the Quiet stage's 3-pole rejection. With servo Hz fields scaled by 16/48 (and the run lengthened to 120 s so the slower quiet loop forgets acquisition — same sample count and loop-τ count as the 48 k tests), the measured structure matches 48 k within +0.7…+1.9 dB, confirming quality is a function of normalized frequency as designed. The test file header documents the scaling rule; a Config-level "scale defaults to my rate" helper is a candidate follow-up.

Measured (host) and pinned (−4 dB convention)

Tone Measured Threshold 48 k counterpart (same f/fs)
333 Hz 136.6 dB 132 135.0 dB (997 Hz)
2 kHz 121.9 dB 117 120.0 dB (6 kHz)
4 kHz 114.3 dB 110 112.8 dB (12 kHz)
6.5 kHz 106.5 dB 102 105.8 dB (19.5 kHz)

Also fixed: a latent test-filter bug

tests/bare_metal_main.cpp's gtest exclusion -AsrcQuality.* treated . as a literal (gtest globs only */?), so the new AsrcQuality16k suite would have run on bare metal — verified empirically with --gtest_list_tests, widened to -AsrcQuality*. The hexagon ctest regex was verified to already cover it.

Full host suite 50/50; README gains a short 16 kHz paragraph in Measured performance (generated PERF/ICOUNT blocks untouched).

https://claude.ai/code/session_01HuAFfoeD5a5Xe5aGNA16M9


Generated by Claude Code

New tests/test_asrc_quality_16k.cpp: 16 kHz -> 16 kHz, +200 ppm,
sample-granular transfer, last 1 s analyzed with fitSineTracked —
the test_asrc_quality.cpp methodology with rate-scaled configuration,
applied test-side only (no header changes):

- FilterSpec band edges scaled by 16/48 (balanced-at-16k: passband
  ~6666.7 Hz, stopband ~9333.3 Hz, L=256, T=48, 120 dB).
- ServoConfig bandwidths scaled by 16/48 as well: they are absolute Hz,
  and with the defaults the 3.2 Hz slip beat (vs 9.6 Hz at 48 k) loses
  (16/48)^3 ~ 28.6 dB of 3-pole smoother rejection, leaving the
  measurement servo-FM-limited ~32 dB below the 48 k figures. Scaling
  keeps the loop identical in normalized terms.
- 120 s run: the same sample count and loop time constants as the 48 k
  test's 40 s, since the quiet loop is now ~0.017 Hz.

Measured (host, Release), thresholds pinned ~4 dB under:

  tone     measured   threshold   48 k counterpart (same f/fs)
  333 Hz   136.6 dB   132 dB      997 Hz: 135.0 dB
  2 kHz    121.9 dB   117 dB      6 kHz: 120.0 dB
  4 kHz    114.3 dB   110 dB      12 kHz: 112.8 dB
  6.5 kHz  106.5 dB   102 dB      19.5 kHz: 105.8 dB

Emulated-target exclusion: the hexagon job's ctest -E 'AsrcQuality|...'
already matches AsrcQuality16k (unanchored regex), but the bare-metal
gtest filter "-AsrcQuality.*" did not ('.' is literal in gtest filters),
so it is widened to "-AsrcQuality*".

README: short 16 kHz note in Measured performance (band-edge/servo
scaling, measured numbers, group delay in ms triples at the same taps).

https://claude.ai/code/session_01HuAFfoeD5a5Xe5aGNA16M9
@tap tap merged commit 5705789 into main Jun 12, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants