Add a dependency-free signal-analysis toolkit and a `specview` dev CLI to evaluate audio (especially echo cancellation) with objective numbers and a terminal spectrogram instead of ear alone. - src/dsp/: hand-written radix-2 FFT, Hann window, STFT, seeded test-signal generators (sine/log-sweep/white/pink/impulse), metrics (RMS/dBFS/peak/ERLE/ per-band energy), minimal WAV read+write, and a 24-bit-ANSI half-block spectrogram renderer (magma colormap, freq/time axes, dB legend, ASCII fallback). Pure layers have no I/O; only `wav` touches the filesystem. - src/bin/specview.rs: `gen` (conjure a test signal -> WAV), `show` (spectrogram + per-band energy summary), `erle` (broadband + per-band echo-return-loss between a before/after pair). - 27 unit tests (FFT correctness, ERLE landmarks, WAV round-trip, render shape). Verified end-to-end: log sweep renders as the expected exponential curve; a 20 dB-quieter copy reads +20.0 dB ERLE broadband and per band. Measurement substrate for upcoming AEC refinement (no shipped-path changes). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
44 lines
1.0 KiB
TOML
44 lines
1.0 KiB
TOML
[package]
|
|
name = "peerspeak"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
|
|
[lib]
|
|
name = "peerspeak"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "peerspeak"
|
|
path = "src/main.rs"
|
|
|
|
[[bin]]
|
|
name = "test_net"
|
|
path = "src/bin/test_net.rs"
|
|
|
|
[[bin]]
|
|
name = "specview"
|
|
path = "src/bin/specview.rs"
|
|
|
|
[dependencies]
|
|
anyhow = "1.0.102"
|
|
async-trait = "0.1.89"
|
|
base64 = "0.22.1"
|
|
bytes = "1.11.1"
|
|
dirs = "6.0.0"
|
|
iced = { version = "0.14.0", features = ["canvas"] }
|
|
iroh = "1.0.0-rc.0"
|
|
iroh-gossip = "0.99.0"
|
|
opus = "0.3.1"
|
|
# v0_3_49 exposes `Buffer::requested()` (the graph's per-cycle quantum), used by
|
|
# the playback RT callback to fill exactly what the device asks for instead of
|
|
# pinning the buffer to a hard-coded 1024-frame quantum (crackle on non-1024
|
|
# hardware). The field has existed in libpipewire since 0.3.49 (2022).
|
|
pipewire = { version = "0.9", features = ["v0_3_49"] }
|
|
rand = "0.10.1"
|
|
ringbuf = "0.5.0"
|
|
serde = { version = "1.0.228", features = ["derive"] }
|
|
serde_json = "1.0.150"
|
|
thiserror = "2.0.18"
|
|
tokio = { version = "1.52.3", features = ["full"] }
|
|
tokio-stream = "0.1.18"
|