docs: add test tool designs and iOS test plan (TODO-020,043,044,046,047)
Design documents for event replay, audio processing test, audio loopback test, and protocol probe tools. iOS audio session test plan with 28 scenarios and 3-phase automation approach.
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
# Audio Processing Test Tool Design
|
||||
|
||||
**Date:** 2026-06-11
|
||||
**Status:** Design proposal
|
||||
**TODO:** TODO-044
|
||||
**Requirements:** SysRS-074, SRS-083
|
||||
**Effort:** L
|
||||
|
||||
## Purpose
|
||||
|
||||
Test the audio DSP pipeline (AEC, NS, AGC, HPF) in isolation. Measures processing latency, signal quality, and verifies each filter stage produces expected output for known input signals.
|
||||
|
||||
## Inputs
|
||||
|
||||
- WAV file (reference signal) or live microphone input
|
||||
- Processing configuration (enable/disable AEC, NS, AGC, HPF)
|
||||
- Optional: reference signal for AEC (far-end playback)
|
||||
|
||||
## Outputs
|
||||
|
||||
- Processed audio WAV file
|
||||
- Per-stage metrics: latency (ms), signal level (dBFS), spectral changes
|
||||
- Pass/fail per processing stage against acceptance thresholds
|
||||
|
||||
## Architecture
|
||||
|
||||
```text
|
||||
┌──────────┐ ┌───────────────────────────────────────┐ ┌──────────┐
|
||||
│ WAV / │────>│ DSP Chain: HPF → NS → AEC → AGC │────>│ Processed│
|
||||
│ Mic Input│ │ (chanora_audio processors) │ │ WAV + │
|
||||
└──────────┘ └────────────────────────┬──────────────┘ │ Metrics │
|
||||
│ └──────────┘
|
||||
┌──────v───────┐
|
||||
│ Metrics │
|
||||
│ Collector │
|
||||
│ (latency, │
|
||||
│ dBFS, SNR) │
|
||||
└──────────────┘
|
||||
```
|
||||
|
||||
1. **Load:** Read WAV file or open mic stream
|
||||
2. **Process:** Feed PCM frames through each enabled DSP stage sequentially
|
||||
3. **Measure:** Collect per-stage latency and signal metrics
|
||||
4. **Output:** Write processed WAV and print metrics table
|
||||
|
||||
## Implementation Plan
|
||||
|
||||
- New Rust binary crate: `tools/audio-processing-test/`
|
||||
- Reuse `chanora_audio` processors: `HpfProcessor`, noise suppression, AEC, AGC
|
||||
- WAV I/O via `hound` crate
|
||||
- CLI interface: `audio-processing-test <input.wav> [--output processed.wav] [--stages hpf,ns,aec,agc]`
|
||||
- Metrics: frame-level latency, input/output RMS, spectral centroid shift
|
||||
|
||||
## Dependencies
|
||||
|
||||
- `chanora_audio` (HPF, NS, AEC, AGC processors)
|
||||
- `hound` (WAV read/write)
|
||||
- `chanora_audio::engine` (AudioProcessingConfig)
|
||||
|
||||
## Verification
|
||||
|
||||
- Unit test: known-tone input through HPF, verify low-frequency attenuation
|
||||
- Unit test: known-noise input through NS, verify noise floor reduction
|
||||
- Integration test: full pipeline on reference WAV, verify output within thresholds
|
||||
- Demo: run tool on sample file, show metrics output
|
||||
Reference in New Issue
Block a user