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}
diff --git a/modules/audio_processing/aec3/subtractor_output_analyzer.cc b/modules/audio_processing/aec3/subtractor_output_analyzer.cc
index baf0600..2b8c4c6 100644
--- a/modules/audio_processing/aec3/subtractor_output_analyzer.cc
+++ b/modules/audio_processing/aec3/subtractor_output_analyzer.cc
@@ -44,7 +44,7 @@
     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] =
diff --git a/modules/audio_processing/aec3/transparent_mode.cc b/modules/audio_processing/aec3/transparent_mode.cc
index 489f53f..4d6937f 100644
--- a/modules/audio_processing/aec3/transparent_mode.cc
+++ b/modules/audio_processing/aec3/transparent_mode.cc
@@ -19,6 +19,7 @@
 
 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 @@
     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 @@
 
  private:
   bool transparency_activated_ = false;
-  float prob_transparent_state_ = 0.f;
+  float prob_transparent_state_ = kInitialTransparentStateProbability;
 };
 
 // Legacy classifier for toggling transparent mode.