Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ CMakeUserPresets.json
.claude/
book/book/
__pycache__/

# ITU real-speech test vectors: local test use only, never committed
# (download from the ITU test-signal database; see docs/itu-compliance.md)
tests/data/itu/
30 changes: 23 additions & 7 deletions HANDOFF.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,29 @@ stand-ins marked method-equivalent; (7) P.502 still unobtained —
analysis methods reconstructed from the P.340/P.111x test descriptions.
Rec PDFs live in the session scratchpad only (never committed).*

**Stage 1 — Calibrated ITU signal layer** (`tests/support/`). Level
calibration conventions (dBov/activity-gated levels), a deterministic
P.501 CSS generator, the P.501 double-talk sequences, per-bandwidth
band-limiting, driving-noise generator + car-cabin echo paths for the
P.1100 series (modeled first; Tim's measured cabin RIRs can join via the
existing fixture pipeline). Pass: generated signals match published
spectral/temporal properties.
**Stage 1 — Calibrated ITU signal layer** (`tests/support/`). *DONE —
`itu_levels.h` (dBov/dBm0/dBPa conventions, prewarped-bilinear
A-weighting, 35/5 ms integrators, sliding peak, P.56-style active-level
meter) + `itu_signals.h` (CSS single/double-talk with the P.501
Table 7-1/7-2 voiced segments transcribed from the PDF, 8192-pt PN
adaptive-systems variant, shaping + band-limit filters, AM-FM
orthogonal pair + comb analysis, activation sequence, Hoth + synthetic
driving noise, moving-reflector time-variant path) +
`tests/fixtures/rir_cabin.h` (image-source cabin, RT60 66.6 ms) +
`test_itu_signals.cpp` (12 tests, measured-first). KEY DECISION made in
stage: the suite runs natively at 44.1 kHz (CSS is sample-exact only
there; matrix updated). Measured instrument floor worth knowing: the
AM-FM comb separation is 94.3 dB at the spec's exact band edges — and
collapses to 19 dB if any guard band is added (recorded in the test).
Existing fixtures verified bit-reproducible with pyroomacoustics 0.10.1
before generating the cabin (--only flag added to the generator). Still
open from this stage: the ITU real-speech attachment WAVs
(tests/data/itu/, git-ignored) for the three signal-exact rows.
AMENDED (Tim's directive): 48 kHz and 16 kHz are REQUIRED operating
rates (44.1 kHz stays the P.501-native reference) — the NOTE 2
resampler was built (ripple <= 0.014 dB, alias rejection 101 dB), the
formula generators take fs directly, and make_css_at() emits
sample-exact periods at every required rate; matrix policy updated.*

**Stage 2 — Residual-echo post-filter + comfort noise.** The big DSP
item. New header (working name `mutap/postfilter.h`): coherence-based
Expand Down
54 changes: 50 additions & 4 deletions docs/itu-compliance.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,25 @@ approach:
detector-free double-talk adaptation is MuTap's measured strength.
- **Bandwidth: wideband (P.1110) and SWB/FB (P.1120) are primary**;
narrowband (P.1100) variants run as band-limited configurations of the
same tests. Everything executes at 48 kHz with P.501-specified
band-limiting of the receive-direction signals (NB 3.6/4 kHz, WB
7.2/8 kHz, SWB 14.4/16 kHz, FB 20 kHz low-pass).
same tests, with P.501-specified band-limiting of the receive-direction
signals (NB 3.6/4 kHz, WB 7.2/8 kHz, SWB 14.4/16 kHz).
- **Sample rates (revised twice; current policy per Tim's directive):
the compliance suite RUNS AT — and every Tier A/B row must pass at —
48 kHz and 16 kHz, with 44.1 kHz kept as the P.501-native reference
rate.** Rationale per rate:
- **48 kHz (required)**: MuTap's operating rate, the automotive recs'
specified analysis rate (8k FFT @ 48 kHz), and the rate at which
the RIR fixtures are exact.
- **16 kHz (required)**: the wideband telephony rate (AMR-WB/P.1110
world). SWB/FB-only clauses are exempt at 16 kHz (they exceed its
8 kHz Nyquist); the AM-FM plans (<= 7.04 kHz) fit.
- **44.1 kHz (reference)**: P.501's native rate, where the CSS
framing is sample-exact without conversion; used to validate the
signal layer itself.
The bridge is the P.501 NOTE 2 resampler (Stage 1): measured passband
ripple <= 0.014 dB (spec < 0.2) and alias rejection 101 dB (spec
> 60); the CSS period stays sample-exact at every required rate
(15435 / 16800 / 5600 samples per 350 ms at 44.1 / 48 / 16 kHz).
- **The simulated echo paths**: the three committed image-source rooms
(fixtures) + a new car-cabin family (small volume ~2.5 m^3, RT ~60 ms
per G.167 5.2.3.1's car figures) + the P.1110/P.1120 time-variant-path
Expand Down Expand Up @@ -238,7 +254,37 @@ implementation budget.

---

## Simulation assets required (feeds Stage 1)
## Simulation assets delivered by Stage 1

`tests/support/itu_levels.h` + `tests/support/itu_signals.h` +
`tests/fixtures/rir_cabin.h`, validated by `tests/test_itu_signals.cpp`
(measured-first thresholds; the file header carries every number).
Instrument floors that bound what the compliance suite can measure:

- CSS single/double-talk: sample-exact framing, PN crest 10.97 dB
(spec 11 +- 1), bin-flat PN, level calibration exact, voiced segments
transcribed from P.501 Tables 7-1/7-2. Available at every required
rate via `make_css_at` (PN crest 11.86 dB at 48 kHz / 11.44 at
16 kHz; AM-FM separation 94.0 / 92.6 dB at 48 / 16 kHz).
- AM-FM orthogonal pair: **94.3 dB comb separation** at the spec's exact
band edges — the double-talk echo-loss measurement floor sits far
beyond the >= 33 dB margin targets. (Analysis discipline recorded in
the test: any added guard band collapses the floor.)
- A-weighting: -19.18 / 0.00 / -1.76 dB at 100 / 1k / 10 kHz
(prewarped bilinear; IEC class-1 envelope).
- NB band-limiter: -85 dB at 4 kHz. Cabin fixture: RT60 66.6 ms.
- P.56 active-level meter: definitionally consistent on sparse speech
(activity 0.312, delta = 10 log10(1/activity) exactly); on CSS the
101 ms pause sits inside the 200 ms hangover, so the G.168
active-part constants (+1.49 / +1.66 dB) are applied arithmetically.

**ITU real-speech attachments** (P.501 7.3.2/7.3.3/7.3.5): still to be
procured — download from the ITU test-signal database into
`tests/data/itu/` (git-ignored; local test use only, never committed).
Until then the affected rows run on the CSS/AM-FM signals and are
reported `method-equivalent`.

## Simulation assets required (original Stage 1 list, for reference)

**Signals (all generatable from P.501's algorithmic descriptions):**
- CSS single-talk, fullband: voiced 48.62 ms (literal sample table 7-1,
Expand Down
3 changes: 2 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ add_executable(mutap_tests
test_adaptation_control.cpp
test_closed_loop.cpp
test_rir_fixtures.cpp
test_aec.cpp)
test_aec.cpp
test_itu_signals.cpp)
target_link_libraries(mutap_tests PRIVATE
MuTap::MuTap
mutap_warnings)
Expand Down
Loading
Loading