Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose more AEC3 params, example & test #45

Open
wants to merge 7 commits into
base: upgrade-v1-aec3-tuning
Choose a base branch
from

Conversation

jacksongoode
Copy link

@jacksongoode jacksongoode commented Jan 11, 2025

I tried to get most of the new params exposed I believe this exposes all of the AEC3. I added a few tests that capture and measure ERL across AEC with different configurations. I also added a module level test to made sure we have the proper props bound. Most of this was some regex transfer over from the cpp to the proper places but I could've missed some items.

I added a new example with the AEC3 config which mirrors the structure of the basic karaoke example but with the ability to just pass in a config.

There's a little bit of weirdness, uncertainty around the need for an EchoCanceller to be explicitly added to the processor, I would imagine it would take a default if undefined.

@jacksongoode jacksongoode force-pushed the upgrade-v1-aec3-tuning branch 3 times, most recently from dc41a7b to d740b36 Compare January 11, 2025 03:16
@jacksongoode jacksongoode marked this pull request as draft January 11, 2025 03:17
@jacksongoode jacksongoode force-pushed the upgrade-v1-aec3-tuning branch from 7462722 to 51cfa88 Compare January 13, 2025 10:40
@jacksongoode jacksongoode marked this pull request as ready for review January 13, 2025 11:00
@jacksongoode jacksongoode force-pushed the upgrade-v1-aec3-tuning branch from 2acf4d9 to 837bcc2 Compare January 13, 2025 18:58
Copy link
Member

@strohel strohel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoa this is a lot of work @jacksongoode, thanks for it! And sorry for my very late review.

I'm adding just some little technicality suggestions, but all of them are very minor.

Comment on lines +235 to +246
impl fmt::Display for AudioProcessingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Self::InvalidParameters => write!(f, "Invalid parameters"),
Self::ConfigValidationFailed => write!(f, "Config validation failed"),
Self::CreationFailed => write!(f, "Failed to create audio processor"),
Self::InitializationFailed(code) => write!(f, "Initialization failed: {}", code),
Self::UnknownError(code) => write!(f, "Unknown error: {}", code),
Self::CppException(code) => write!(f, "C++ exception occurred: {}", code),
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option is to use thiserror to write these in more consice manner and have Display generated, but it won't save us much anyway. (so not advocating for that)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants