AGC2 lightweight noise floor estimator

The current noise level estimator has a bug due to which the estimated
level decays to the lower bound in a few seconds when speech is observed.
Instead of fixing the current implementation, which is based on a
stationarity classifier, an alternative, lightweight, noise floor
estimator has been added and tuned for AGC2.

Tested on several AEC dumps including HW mute, music and fast talking.

Bug: webrtc:7494
Change-Id: Iae4cff9fc955a716878f830957e893cd5bc59446
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214133
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33733}
This commit is contained in:
Alessio Bazzica
2021-04-14 16:17:09 +02:00
committed by Commit Bot
parent 3ab7a55f6e
commit 61982a7f2d
10 changed files with 246 additions and 42 deletions

View File

@ -57,6 +57,17 @@ std::string GainController2LevelEstimatorToString(
RTC_CHECK_NOTREACHED();
}
std::string GainController2NoiseEstimatorToString(
const Agc2Config::NoiseEstimator& type) {
switch (type) {
case Agc2Config::NoiseEstimator::kStationaryNoise:
return "StationaryNoise";
case Agc2Config::NoiseEstimator::kNoiseFloor:
return "NoiseFloor";
}
RTC_CHECK_NOTREACHED();
}
} // namespace
constexpr int AudioProcessing::kNativeSampleRatesHz[];
@ -160,7 +171,9 @@ std::string AudioProcessing::Config::ToString() const {
<< ", fixed_digital: { gain_db: "
<< gain_controller2.fixed_digital.gain_db
<< " }, adaptive_digital: { enabled: "
<< gain_controller2.adaptive_digital.enabled
<< gain_controller2.adaptive_digital.enabled << ", noise_estimator: "
<< GainController2NoiseEstimatorToString(
gain_controller2.adaptive_digital.noise_estimator)
<< ", level_estimator: { vad_probability_attack: "
<< gain_controller2.adaptive_digital.vad_probability_attack << ", type: "
<< GainController2LevelEstimatorToString(