From 0d8c100e814f82c35d445918423a4fa2e482166e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85hgren?= Date: Wed, 10 Oct 2018 00:25:16 +0200 Subject: [PATCH] AEC3: Decrease the suppression during the echo-only case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL changes the tuning of the echo suppressor for the case when there is echo only. The resulting effect is a slight increase of transparency Bug: webrtc:9844,chromium:893744 Change-Id: I5e6a867e0d03dc3a468a8f5cfa64103e001baae1 Reviewed-on: https://webrtc-review.googlesource.com/c/104760 Commit-Queue: Per Åhgren Reviewed-by: Per Åhgren Reviewed-by: Jesus de Vicente Pena Reviewed-by: Gustaf Ullberg Cr-Commit-Position: refs/heads/master@{#25075} --- api/audio/echo_canceller3_config.h | 2 +- modules/audio_processing/aec3/echo_canceller3.cc | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/api/audio/echo_canceller3_config.h b/api/audio/echo_canceller3_config.h index d88c9c450c..113a06ec8e 100644 --- a/api/audio/echo_canceller3_config.h +++ b/api/audio/echo_canceller3_config.h @@ -178,7 +178,7 @@ struct EchoCanceller3Config { float max_dec_factor_lf; }; - Tuning normal_tuning = Tuning(MaskingThresholds(.2f, .3f, .3f), + Tuning normal_tuning = Tuning(MaskingThresholds(.3f, .4f, .3f), MaskingThresholds(.07f, .1f, .3f), 2.0f, 0.25f); diff --git a/modules/audio_processing/aec3/echo_canceller3.cc b/modules/audio_processing/aec3/echo_canceller3.cc index 271d38422f..bb5edee27a 100644 --- a/modules/audio_processing/aec3/echo_canceller3.cc +++ b/modules/audio_processing/aec3/echo_canceller3.cc @@ -74,6 +74,10 @@ bool EnableLegacyDominantNearend() { return field_trial::IsEnabled("WebRTC-Aec3EnableLegacyDominantNearend"); } +bool UseLegacyNormalSuppressorTuning() { + return field_trial::IsEnabled("WebRTC-Aec3UseLegacyNormalSuppressorTuning"); +} + // Method for adjusting config parameter dependencies.. EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) { EchoCanceller3Config adjusted_cfg = config; @@ -176,6 +180,14 @@ EchoCanceller3Config AdjustConfig(const EchoCanceller3Config& config) { EchoCanceller3Config::Suppressor::MaskingThresholds(.2f, .3f, .3f), EchoCanceller3Config::Suppressor::MaskingThresholds(.07f, .1f, .3f), 2.0f, 0.25f); + } + + if (UseLegacyNormalSuppressorTuning()) { + adjusted_cfg.suppressor.normal_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;