ITU compliance Stage 1: the calibrated signal layer#6
Merged
Conversation
The instruments and stimuli the compliance suite will run on, validated measured-first (test_itu_signals.cpp, 12 tests; every number in the file header): - tests/support/itu_levels.h: the dBov/dBm0/dBPa calibration plane, prewarped-bilinear A-weighting (spot gains -19.18/0.00/-1.76 dB at 100/1k/10k), 35/5 ms integrators, sliding-window peak, P.56-style active-speech-level meter (definitionally consistent on sparse speech). - tests/support/itu_signals.h: CSS single/double-talk generated from P.501's algorithmic descriptions with the Table 7-1/7-2 voiced segments transcribed from the rec text (sample-exact framing at the native 44.1 kHz rate — a Stage 1 decision, matrix updated), 8192-pt adaptive-systems PN (crest 10.97 dB, bin-flat), shaping and Table 7-7 band-limit filters (NB -85 dB at 4 kHz), the AM-FM orthogonal double-talk pair with comb analysis (94.3 dB separation at the spec's exact band edges), activation sequence, Hoth + synthetic driving noise, moving-reflector time-variant path helper (plus echo_sim::set_echo_path to drive it). - tests/fixtures/rir_cabin.h: the automotive echo path (image-source, ~2.6 m^3, RT60 66.6 ms per G.167's car figure). Existing fixtures verified bit-reproducible before generating; --only flag added to the generator so committed baselines are never touched. No ITU signal files are redistributed; the real-speech attachment WAVs remain to be procured into git-ignored tests/data/itu/. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TLE2rvptWxV8catE8vTvgx
Per Tim's directive the compliance matrix now REQUIRES 48 kHz (MuTap's rate, the automotive recs' specified analysis rate, and where the RIR fixtures are exact) and 16 kHz (the wideband telephony rate) alongside the 44.1 kHz P.501-native reference. The bridge is the P.501 NOTE 2 resampler, built and measured: passband ripple <= 0.014 dB (spec < 0.2), alias rejection 101 dB at 16 kHz output (spec > 60). The CSS period stays sample-exact at every required rate (15435 / 16800 / 5600 samples per 350 ms); make_css_at() emits per-rate CSS, and the formula-based generators (AM-FM, noise, activation, band limits, moving reflector) take fs directly. Measured at the new rates: PN crest 11.86 / 11.44 dB (spec 11 +- 1), AM-FM comb separation 94.0 / 92.6 dB. Three new ItuRates tests; matrix + HANDOFF updated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TLE2rvptWxV8catE8vTvgx
dcb2254 to
a223fb4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was stacked on #5 (the Rev 5 plan + Stage 0 matrix); now rebased onto main after #5's merge, so this PR shows Stage 1 only: two commits — the signal layer, then the multi-rate amendment.
The instruments and stimuli the compliance suite will run on, everything validated measured-first (
tests/test_itu_signals.cpp, 15 tests; the file header carries every measured number). Full suite green, clang-format/tidy clean.tests/support/itu_levels.h— the calibration planeOne documented mapping between the recs' units (dBm0 / dBPa / dBov) and the simulation's linear float domain; prewarped-bilinear A-weighting (spot gains −19.18 / 0.00 / −1.76 dB at 100 Hz / 1 kHz / 10 kHz, inside the IEC class-1 envelope); the 35 ms and 5 ms level integrators plus G.168's sliding-window peak; a P.56-style active-speech-level meter (definitionally consistent on sparse speech: activity 0.312 with level delta exactly 10·log10(1/activity)).
tests/support/itu_signals.h— the stimuliecho_sim::set_echo_pathto drive it).tests/fixtures/rir_cabin.h— the automotive echo pathImage-source cabin (~2.6 m³), RT60 66.6 ms (G.167's car figure: ~60 ms typical). The existing fixture rooms were verified bit-reproducible with the installed pyroomacoustics before generating, and the generator gained an
--onlyflag so committed baselines are never regenerated incidentally.Sample-rate policy (revised in this PR per Tim's directive)
48 kHz and 16 kHz are REQUIRED operating rates; 44.1 kHz stays the P.501-native reference (CSS framing is sample-exact there without conversion). The bridge is the P.501 NOTE 2 resampler, built and measured in the second commit: passband ripple ≤ 0.014 dB (spec < 0.2), alias rejection 101 dB (spec > 60); the formula generators take fs directly and
make_css_at()emits sample-exact periods at every required rate (15435 / 16800 / 5600 samples per 350 ms at 44.1 / 48 / 16 kHz).Carry-forwards recorded in the matrix
The ITU real-speech attachment WAVs (P.501 7.3.2/7.3.3/7.3.5) remain to be procured into git-ignored
tests/data/itu/; affected rows runmethod-equivalenton CSS/AM-FM until then.🤖 Generated with Claude Code
https://claude.ai/code/session_01TLE2rvptWxV8catE8vTvgx