Repository navigation
Integrate reviewed AEC3 0.4 migration with audio regressions and wheel CI - #2
Merged
Merged
Conversation
The upstream `voip` module was removed in aec3 0.4.0 and replaced by
`aec3::pipelines::linear`, which caused the build error on the dependency
bump. This reworks src/lib.rs against the new API while keeping the
Python-facing interface backward compatible.
Rust dependencies:
- aec3 0.1 -> 0.4.0, pyo3 0.27 -> 0.29, numpy 0.27 -> 0.29
- edition 2024, declare rust-version = 1.85
Python-visible changes:
- Aec3 now wraps LinearPipeline (HPF -> AEC3 -> NS -> AGC2, post filter
at 48 kHz); process/process_capture_frame signatures and return values
unchanged; legacy `level_change` arg still accepted but ignored
- Metrics: cache latest metrics from the new export sink; add jitter
fields (render/capture_jitter_min/max)
- set_audio_buffer_delay maps to LinearPipeline::set_delay_ms and may
raise ValueError on graph errors
Metadata:
- version 0.2.0; requires-python >= 3.10 to match the wheel matrix
(3.10-3.14); drop 3.8/3.9 classifiers
- README & examples updated accordingly; remove PyMetrics Clone derive
to fix pyo3 0.29 deprecation warning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrates #1 while preserving its original commits and author attribution.
The migration silently ignored capture gain changes and implicitly enabled NS/AGC2/post filtering. Forward level_change through capture packet metadata; preserve HPF+AEC defaults and expose added stages as keyword-only opt-ins. Validate finite samples before DSP mutation and report missing output as an error. Correct Rust minimum to 1.88 and declare runtime NumPy; regenerate uv.lock.
Validation: 69 regression tests passed locally on Linux x86_64 / CPython 3.12. Release-wheel CI covers Python 3.10–3.14 on Linux, Windows and macOS, plus clippy/fmt and an MSRV build. Tests cover 16/32/48 kHz, all mono/stereo channel combinations, echo-only adaptation, near-end survival, gain changes, malformed/non-finite inputs, ownership, split/combined streaming and metrics.
Same-host isolated synthetic comparison: default migration output attenuation 35–62 dB versus 14–19 dB for 0.1.1. Full per-configuration timing and limitations are in docs/migration-review.md. These are synthetic signals, not speech-quality or real-room guarantees.
Merge only after the complete CI matrix succeeds; use a merge commit to retain the original PR ancestry.