Retuning of the HMM transparent mode classifier

- Assume a non-zero probability of starting in transparent state
  (transparent mode can be reached sooner).
- Relax the requirements for when the filter is considered converged
  (reduces the risk of incorrectly entering transparent mode in the
  presence of near-end noise).

Bug: b/340578713
Change-Id: I6be9b5b74457066f9900c8020c0ebf19623a70df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350602
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42318}
This commit is contained in:
Gustaf Ullberg 2024-05-15 12:38:25 +02:00 committed by WebRTC LUCI CQ
parent 0b496cc347
commit b4dcac3e1a
2 changed files with 4 additions and 3 deletions

View File

@ -44,7 +44,7 @@ void SubtractorOutputAnalyzer::Update(
bool coarse_filter_converged_strict =
e2_coarse < 0.05f * y2 && y2 > kConvergenceThreshold;
bool coarse_filter_converged_relaxed =
e2_coarse < 0.2f * y2 && y2 > kConvergenceThresholdLowLevel;
e2_coarse < 0.3f * y2 && y2 > kConvergenceThresholdLowLevel;
float min_e2 = std::min(e2_refined, e2_coarse);
bool filter_diverged = min_e2 > 1.5f * y2 && y2 > 30.f * 30.f * kBlockSize;
filters_converged_[ch] =

View File

@ -19,6 +19,7 @@ namespace {
constexpr size_t kBlocksSinceConvergencedFilterInit = 10000;
constexpr size_t kBlocksSinceConsistentEstimateInit = 10000;
constexpr float kInitialTransparentStateProbability = 0.2f;
bool DeactivateTransparentMode() {
return field_trial::IsEnabled("WebRTC-Aec3TransparentModeKillSwitch");
@ -41,7 +42,7 @@ class TransparentModeImpl : public TransparentMode {
transparency_activated_ = false;
// The estimated probability of being transparent mode.
prob_transparent_state_ = 0.f;
prob_transparent_state_ = kInitialTransparentStateProbability;
}
void Update(int filter_delay_blocks,
@ -118,7 +119,7 @@ class TransparentModeImpl : public TransparentMode {
private:
bool transparency_activated_ = false;
float prob_transparent_state_ = 0.f;
float prob_transparent_state_ = kInitialTransparentStateProbability;
};
// Legacy classifier for toggling transparent mode.