diff --git a/api/audio/echo_canceller3_config.h b/api/audio/echo_canceller3_config.h index ea6e51baf9..ffe17f2b8b 100644 --- a/api/audio/echo_canceller3_config.h +++ b/api/audio/echo_canceller3_config.h @@ -182,8 +182,8 @@ struct RTC_EXPORT EchoCanceller3Config { 0.25f); struct DominantNearendDetection { - float enr_threshold = 4.f; - float enr_exit_threshold = .1f; + float enr_threshold = .25f; + float enr_exit_threshold = 10.f; float snr_threshold = 30.f; int hold_duration = 50; int trigger_threshold = 12; diff --git a/modules/audio_processing/aec3/suppression_gain.cc b/modules/audio_processing/aec3/suppression_gain.cc index 88cfc0a01e..c6d2bf6673 100644 --- a/modules/audio_processing/aec3/suppression_gain.cc +++ b/modules/audio_processing/aec3/suppression_gain.cc @@ -419,7 +419,7 @@ void SuppressionGain::DominantNearendDetector::Update( // Detect strong active nearend if the nearend is sufficiently stronger than // the echo and the nearend noise. if ((!initial_state || use_during_initial_phase_) && - ne_sum > enr_threshold_ * echo_sum && + echo_sum < enr_threshold_ * ne_sum && ne_sum > snr_threshold_ * noise_sum) { if (++trigger_counter_ >= trigger_threshold_) { // After a period of strong active nearend activity, flag nearend mode. @@ -432,7 +432,7 @@ void SuppressionGain::DominantNearendDetector::Update( } // Exit nearend-state early at strong echo. - if (ne_sum < enr_exit_threshold_ * echo_sum && + if (echo_sum > enr_exit_threshold_ * ne_sum && echo_sum > snr_threshold_ * noise_sum) { hold_counter_ = 0; }