tsc-core: audio thread with processing, voice activation, client volume, device reopening

The device-independent part is a Pipeline (unit tested without hardware):
microphone -> Processor -> VAD / push-to-talk / continuous (with pre-roll)
-> Opus; mixer (per-client volume) -> output volume -> speakers, with the
played signal as the echo canceller reference. Devices go through
tsc_audio::device::Managed, so a lost microphone or headset is reopened or
replaced by the default device, and the playback queue is kept at the
configured latency instead of full.

New AudioIn messages (Settings, ClientVolume, ClientMuted, ClientLeft)
are ready for the session to send.

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:43 +00:00
1 parent b3737c00a6
commit 5fb64b8189
2 files changed
+460 -120

No files matched your search

+3 -3
View File
@@ -18,9 +18,9 @@ The audio thread lives in `tsc-core/src/audio.rs`; the building blocks are in
the WebRTC audio processing module: AEC3, the WebRTC noise suppressor, AGC2
(adaptive digital gain + limiter) and a high-pass filter. Chosen over:
- `webrtc-audio-processing`: binds the C++ library (a system package or a bundled
C++ build via meson), a licence field that cargo-deny does not recognise, and
extra toolchain work on Windows and Android;
- `webrtc-audio-processing`: binds the C++ library, either a system package found
through pkg-config or a bundled C++ build (autotools, bindgen/libclang); its
licence is not an SPDX expression, and Windows/Android need extra toolchain work;
- `nnnoiseless` (RNNoise port): noise suppression only, no echo cancellation.
sonora needs no C/C++ toolchain, so it builds the same everywhere. It runs on 10 ms