Compensate for the compression gain in the IntelligibilityEnhancer
The render signal that reaches the IE is already normalized and compressed by an AGC on the far-end capture processing. Because the noise estimation is done before the AGC compression, we need to compensate for this gain in the IE to be able to compare these 2 powers.
Review-Url: https://codereview.webrtc.org/1913603002
Cr-Commit-Position: refs/heads/master@{#12549}
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc
index af6d9b7..d89cc33 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -706,8 +706,10 @@
public_submodules_->noise_suppression->ProcessCaptureAudio(ca);
if (constants_.intelligibility_enabled) {
RTC_DCHECK(public_submodules_->noise_suppression->is_enabled());
+ RTC_DCHECK(public_submodules_->gain_control->is_enabled());
public_submodules_->intelligibility_enhancer->SetCaptureNoiseEstimate(
- public_submodules_->noise_suppression->NoiseEstimate());
+ public_submodules_->noise_suppression->NoiseEstimate(),
+ public_submodules_->gain_control->compression_gain_db());
}
// Ensure that the stream delay was set before the call to the