tsc-audio: echo cancellation, noise suppression, gain control, VAD, client volume, device hotplug

- process: Processor on sonora (pure Rust WebRTC APM: AEC3, NS, AGC2,
  high-pass) with serde ProcessingSettings; far end fed from what is played
- vad: level gate with hangover, optional RNN speech probability
- mixer: Mixer wraps the vendored AudioHandler with per-client volume/mute
- settings: AudioSettings bundles transmit mode, processing, VAD, devices
- device: stable device ids, default flags, loss detection through the
  error callback, Managed reopen/fallback policy
- tests: synthetic echo >= 10 dB, noise suppression keeps tone bursts,
  per-client gain, one-hour drift simulation at +-200 ppm
- dev profile optimises the sonora crates (real-time in debug builds)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
This commit is contained in:
Claude committed 2026-09-25 19:48:23 +00:00
1 parent 81ecb53100
commit b3737c00a6
12 files changed
+1716 -26

No files matched your search

Generated
+78
View File
@@ -7370,6 +7370,79 @@ dependencies = [
"x11rb",
]
[[package]]
name = "sonora"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e1ce442ab5cb392c4067b8f2cced20be4cf12e479f6dfbf44acbe9b14ac9250"
dependencies = [
"sonora-aec3",
"sonora-agc2",
"sonora-common-audio",
"sonora-ns",
"sonora-simd",
"tracing",
]
[[package]]
name = "sonora-aec3"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50280e31256d09f7838aff6715ed4b7640e514dc1092a1e14013c01e552380db"
dependencies = [
"sonora-common-audio",
"sonora-fft",
"sonora-simd",
]
[[package]]
name = "sonora-agc2"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a93a9fa8373a33e61a7fb441d8a9e725ac6024079d2c77a845cf6abe1790b9f"
dependencies = [
"bytemuck",
"derive_more",
"sonora-common-audio",
"sonora-fft",
"sonora-simd",
"tracing",
]
[[package]]
name = "sonora-common-audio"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6635bc61b24807ceac93ad0807b1292b6b0620caa6cd360d3be89fc616b833cc"
dependencies = [
"derive_more",
"sonora-simd",
]
[[package]]
name = "sonora-fft"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27e272c70f34363afb5382dd1818c05f8f63ef6785635736a14e9ccbbb5ba012"
[[package]]
name = "sonora-ns"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d511feef19302c716d245c4555087d161ba91c178735ea11107dcce0d0b7a86f"
dependencies = [
"sonora-fft",
]
[[package]]
name = "sonora-simd"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7cf0804e4752a5562262e143014f53043080ead4cd5a98f9278d3ceaf32d868"
dependencies = [
"cpufeatures 0.3.1",
]
[[package]]
name = "spin_on"
version = "0.1.1"
@@ -8243,6 +8316,11 @@ dependencies = [
"opus2",
"rtrb",
"rubato",
"serde",
"serde_json",
"sonora",
"sonora-agc2",
"sonora-simd",
"thiserror 2.0.21",
"tracing",
"tsclientlib",