-
Notifications
You must be signed in to change notification settings - Fork 28
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 custom configuration of internal AEC3 #44
base: upgrade-v1
Are you sure you want to change the base?
Conversation
cf4c5af
to
fddf41d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far, though I suppose this is still draft with more settings to be added?
Update: oh I see that #45 adds to this PR
webrtc::EchoCanceller3Config build_aec3_config(const EchoCanceller3ConfigOverride& override) { | ||
webrtc::EchoCanceller3Config config; | ||
config.delay.num_filters = override.num_filters; | ||
return config; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Supernit: override
seems to be a C++ keyword (as GitHub highlights it and as I rembember). Even though it compiles, it may be better can name it differently:
webrtc::EchoCanceller3Config build_aec3_config(const EchoCanceller3ConfigOverride& override) { | |
webrtc::EchoCanceller3Config config; | |
config.delay.num_filters = override.num_filters; | |
return config; | |
} | |
webrtc::EchoCanceller3Config build_aec3_config(const EchoCanceller3ConfigOverride& config_override) { | |
webrtc::EchoCanceller3Config config; | |
config.delay.num_filters = config_override.num_filters; | |
return config; | |
} |
/// Initializes internal states, while retaining all user settings. This should be called before | ||
/// beginning to process a new audio stream. However, it is not necessary to call before processing | ||
/// the first stream after creation. | ||
pub fn initialize(&mut self) { | ||
self.inner.initialize() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I guess the idea is we could use this from our portal code?
This PR exposes some internals of the
EchoCanceller3
.It's not as clean as I hope, as
EchoCanceller3
isn't part of the public API of the underlying library, whereasEchoCanceller3Config
is, and some C/C++ dance was necessary to make the build happy. I will later look into forking the upstream repo and more properly exposingEchoCanceller3
.EchoCanceller3Config
has so many parameters, and none of them are documented unfortunately. I've no idea which parameters are useful exposing and tweaking, so I just randomly started withnum_filters
, which I assumed is the number of linear regression filters.