Revert "Remove unused APM voice activity detection sub-module"

This reverts commit b4e06d032e6f82a65c52ed0c5364ae9e7c0a0215.

Reason for revert: breaking downstream projects

Original change's description:
> Remove unused APM voice activity detection sub-module
>
> API changes:
> - webrtc::AudioProcessing::Config::VoiceDetection removed
> - webrtc::AudioProcessingStats::voice_detected deprecated
> - cricket::AudioOptions::typing_detection deprecated
> - webrtc::StatsReport::StatsValueName::
>   kStatsValueNameTypingNoiseState deprecated
>
> PSA: https://groups.google.com/g/discuss-webrtc/c/7X6uwmJarE0
>
> Bug: webrtc:11226,webrtc:11292
> Change-Id: I8d008b56708cf62961b9857ec052b59fda3b41bf
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250666
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35975}

TBR=gustaf@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,terelius@webrtc.org,hta@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Iee01fdb874b4e0331277f3ffe60dacaabc3859a2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11226,webrtc:11292
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251600
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35977}
This commit is contained in:
Alessio Bazzica
2022-02-11 10:57:44 +00:00
committed by WebRTC LUCI CQ
parent 9cc5fffee1
commit a751f167c6
23 changed files with 483 additions and 18 deletions

View File

@ -113,6 +113,8 @@ static constexpr int kClippedLevelMin = 70;
//
// config.high_pass_filter.enabled = true;
//
// config.voice_detection.enabled = true;
//
// apm->ApplyConfig(config)
//
// apm->noise_reduction()->set_level(kHighSuppression);
@ -230,6 +232,11 @@ class RTC_EXPORT AudioProcessing : public rtc::RefCountInterface {
bool enabled = false;
} transient_suppression;
// Enables reporting of `voice_detected` in webrtc::AudioProcessingStats.
struct VoiceDetection {
bool enabled = false;
} voice_detection;
// Enables automatic gain control (AGC) functionality.
// The automatic gain control (AGC) component brings the signal to an
// appropriate range. This is done by applying a digital gain directly and,