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}
diff --git a/modules/audio_processing/include/audio_processing.h b/modules/audio_processing/include/audio_processing.h
index a5c266a..781b17e 100644
--- a/modules/audio_processing/include/audio_processing.h
+++ b/modules/audio_processing/include/audio_processing.h
@@ -350,21 +350,23 @@
}
enum LevelEstimator { kRms, kPeak };
+ enum NoiseEstimator { kStationaryNoise, kNoiseFloor };
bool enabled = false;
struct FixedDigital {
float gain_db = 0.0f;
} fixed_digital;
struct AdaptiveDigital {
bool enabled = false;
+ NoiseEstimator noise_estimator = kNoiseFloor;
int vad_reset_period_ms = 1500;
- float vad_probability_attack = 0.3f;
+ float vad_probability_attack = 0.9f;
LevelEstimator level_estimator = kRms;
- int level_estimator_adjacent_speech_frames_threshold = 6;
+ int level_estimator_adjacent_speech_frames_threshold = 11;
// TODO(crbug.com/webrtc/7494): Remove `use_saturation_protector`.
bool use_saturation_protector = true;
float initial_saturation_margin_db = 20.0f;
float extra_saturation_margin_db = 5.0f;
- int gain_applier_adjacent_speech_frames_threshold = 6;
+ int gain_applier_adjacent_speech_frames_threshold = 11;
float max_gain_change_db_per_second = 3.0f;
float max_output_noise_level_dbfs = -55.0f;
bool sse2_allowed = true;