feat: automated echo quality test with time-window analysis

New --echo-test <secs> flag sends a 440Hz tone through relay echo,
records the return, and analyzes quality in 5-second windows:
- Per-window: frames sent/received, loss %, SNR (dB), correlation
- Detects quality degradation over time (compares first vs second half)
- Reports jitter buffer stats (depth, lost, late packets)
- Diagnoses jitter buffer drift and packet loss accumulation

Also exposes jitter_stats() on CallDecoder for diagnostics.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-03-27 17:44:08 +04:00
parent 26ed015cca
commit 28d5a3a9ad
4 changed files with 370 additions and 1 deletions

View File

@@ -225,6 +225,11 @@ impl CallDecoder {
pub fn profile(&self) -> QualityProfile {
self.profile
}
/// Get jitter buffer statistics.
pub fn jitter_stats(&self) -> wzp_proto::jitter::JitterStats {
self.jitter.stats().clone()
}
}
#[cfg(test)]