Audio engine (Rust): - Android Oboe: WebRTC APM (AEC/NS/AGC/HPF) + TEN/Silero ONNX VAD - Hardware effects (JNI) with software fallback per-effect - Render reference buffer for AEC between output/capture callbacks - Voice activity gate: suppress transmission when speaker muted (all platforms) - Audio focus (SDD-109) + Bluetooth SCO (SDD-110) via JNI - ONNX Runtime 1.26 via ort 2.0.0-rc.12 (down from rc.10, ndarray 0.17) - VAD worker channel capacity 8→32, initial seq u64::MAX (warm-up fix) - TEN VAD default backend (was Silero) - Platform→WebrtcApm resolution after hardware binding - oboe-rs edisonjwa fork with get_raw_session_id() Android Kotlin: - AndroidAudioFocusController + AndroidBluetoothScoController - AndroidAudioLifecycleController (route changes to Flutter) - ProGuard rules for new controllers Flutter UI: - VoiceSettings: Android HW/SW toggle (Platform auto / WebRTC APM) - VoiceStatusChip: mute warning border + Speaker muted label - BBCode welcome message parser (BbCodeText, case-insensitive) - Welcome message foldable (expanded by default) - Link trust dialog (domain wildcards, SharedPreferences) - HapticFeedback on voice sheet opener - Server name in AppBar, version v0.1.0 - Default channel (id=1) visible, serverquery clients hidden - flutter_foreground_task integration Config: - ort load-dynamic on all non-iOS (Android/Linux/Windows) - ONNX Runtime AAR 1.26.0 - ndarray moved to common deps (was Apple-only)
34 lines
1.1 KiB
Rust
34 lines
1.1 KiB
Rust
//! Realtime-safe audio processors for platform and software voice paths.
|
|
|
|
pub mod dsp;
|
|
pub mod noop;
|
|
pub mod platform;
|
|
pub mod sonora;
|
|
pub mod webrtc_apm;
|
|
|
|
pub use noop::NoopProcessor;
|
|
pub use platform::PlatformVoiceProcessor;
|
|
pub use sonora::SonoraProcessor;
|
|
pub use webrtc_apm::WebRtcApmProcessor;
|
|
|
|
/// 10 ms mono f32 processing frame at 48 kHz (480 samples).
|
|
pub const FRAME_SAMPLES: usize = 480;
|
|
|
|
/// Realtime-safe audio processor backend.
|
|
///
|
|
/// Implementations MUST be `Send` and MUST NOT allocate, block, or
|
|
/// perform I/O inside `process_capture` or `process_render`.
|
|
pub trait AudioProcessor: Send {
|
|
/// Process one 10 ms capture frame in-place.
|
|
fn process_capture(&mut self, frame: &mut [f32; FRAME_SAMPLES]);
|
|
|
|
/// Feed one 10 ms render-reference frame (decoded remote PCM
|
|
/// before playout). Required by software AEC backends; no-op
|
|
/// for platform and noop backends.
|
|
fn process_render(&mut self, frame: &[f32; FRAME_SAMPLES]);
|
|
|
|
/// Return true if this backend performs acoustic echo cancellation
|
|
/// so the engine can enforce INV_009 / INV_010.
|
|
fn has_aec(&self) -> bool;
|
|
}
|