Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: webrtc/modules/audio_processing/agc/agc.h

Issue 1212543002: Pull the Voice Activity Detector out from the AGC (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/agc/agc.h
diff --git a/webrtc/modules/audio_processing/agc/agc.h b/webrtc/modules/audio_processing/agc/agc.h
index 1ecdab1166bf5b612af51540ee6d32a32bb6df96..dd4605e812e9cbbf14470da9ad96ea4f12d471bd 100644
--- a/webrtc/modules/audio_processing/agc/agc.h
+++ b/webrtc/modules/audio_processing/agc/agc.h
@@ -12,16 +12,13 @@
#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_H_
#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/modules/audio_processing/vad/voice_activity_detector.h"
#include "webrtc/typedefs.h"
namespace webrtc {
class AudioFrame;
-class AgcAudioProc;
class Histogram;
-class PitchBasedVad;
-class Resampler;
-class StandaloneVad;
class Agc {
public:
@@ -44,24 +41,16 @@ class Agc {
virtual int set_target_level_dbfs(int level);
virtual int target_level_dbfs() const { return target_level_dbfs_; }
- virtual void EnableStandaloneVad(bool enable);
- virtual bool standalone_vad_enabled() const {
- return standalone_vad_enabled_;
+ virtual float voice_probability() const {
+ return vad_.last_voice_probability();
}
- virtual double voice_probability() const { return last_voice_probability_; }
-
private:
double target_level_loudness_;
- double last_voice_probability_;
int target_level_dbfs_;
- bool standalone_vad_enabled_;
rtc::scoped_ptr<Histogram> histogram_;
rtc::scoped_ptr<Histogram> inactive_histogram_;
- rtc::scoped_ptr<AgcAudioProc> audio_processing_;
- rtc::scoped_ptr<PitchBasedVad> pitch_based_vad_;
- rtc::scoped_ptr<StandaloneVad> standalone_vad_;
- rtc::scoped_ptr<Resampler> resampler_;
+ VoiceActivityDetector vad_;
};
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698