AEC3: Utilize dominant nearend functionality to increase transparency

This CL utilizes the AEC3 ability to tailor the suppressor during
situations when the nearend dominates over the residual echo. This is
done by increasing the thresholds for transparent echo suppressor
behavior when the nearend is strong compared to the residual echo.

Bug: webrtc:9836, chromium:893744
Change-Id: Ic06569eefc7f2557b401db43b3ac84b299071294
Reviewed-on: https://webrtc-review.googlesource.com/c/104460
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25071}
This commit is contained in:
Per Åhgren
2018-10-09 23:33:00 +02:00
committed by Commit Bot
parent 3a3f0274ed
commit 13d392d0e8
2 changed files with 21 additions and 5 deletions

View File

@ -70,6 +70,10 @@ bool EnableNewFilterParams() {
return !field_trial::IsEnabled("WebRTC-Aec3NewFilterParamsKillSwitch");
}
bool EnableLegacyDominantNearend() {
return field_trial::IsEnabled("WebRTC-Aec3EnableLegacyDominantNearend");
}
// Method for adjusting config parameter dependencies..
EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) {
EchoCanceller3Config adjusted_cfg = config;
@ -166,6 +170,18 @@ EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) {
adjusted_cfg.ep_strength.default_len = 0.88f;
}
if (EnableLegacyDominantNearend()) {
adjusted_cfg.suppressor.nearend_tuning =
EchoCanceller3Config::Suppressor::Tuning(
EchoCanceller3Config::Suppressor::MaskingThresholds(.2f, .3f, .3f),
EchoCanceller3Config::Suppressor::MaskingThresholds(.07f, .1f, .3f),
2.0f, 0.25f);
adjusted_cfg.suppressor.dominant_nearend_detection.enr_threshold = 10.f;
adjusted_cfg.suppressor.dominant_nearend_detection.snr_threshold = 10.f;
adjusted_cfg.suppressor.dominant_nearend_detection.hold_duration = 25;
}
return adjusted_cfg;
}