Bump to WebRTC M131 release
Ongoing fixes and improvements, transient suppressor is gone. Also, dropping isac because it doesn't seem to be useful, and is just build system deadweight now. Upstream references: Version: 131.0.6778.200 WebRTC: 79aff54b0fa9238ce3518dd9eaf9610cd6f22e82 Chromium: 2a19506ad24af755f2a215a4c61f775393e0db42
This commit is contained in:
@ -14,10 +14,9 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "api/array_view.h"
|
||||
#include "api/audio/audio_view.h"
|
||||
#include "common_audio/resampler/include/push_resampler.h"
|
||||
#include "modules/audio_processing/agc2/cpu_features.h"
|
||||
#include "modules/audio_processing/include/audio_frame_view.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -37,7 +36,7 @@ class VoiceActivityDetectorWrapper {
|
||||
// Resets the internal state.
|
||||
virtual void Reset() = 0;
|
||||
// Analyzes an audio frame and returns the speech probability.
|
||||
virtual float Analyze(rtc::ArrayView<const float> frame) = 0;
|
||||
virtual float Analyze(MonoView<const float> frame) = 0;
|
||||
};
|
||||
|
||||
// Ctor. Uses `cpu_features` to instantiate the default VAD.
|
||||
@ -60,21 +59,18 @@ class VoiceActivityDetectorWrapper {
|
||||
delete;
|
||||
~VoiceActivityDetectorWrapper();
|
||||
|
||||
// Initializes the VAD wrapper.
|
||||
void Initialize(int sample_rate_hz);
|
||||
|
||||
// Analyzes the first channel of `frame` and returns the speech probability.
|
||||
// `frame` must be a 10 ms frame with the sample rate specified in the last
|
||||
// `Initialize()` call.
|
||||
float Analyze(AudioFrameView<const float> frame);
|
||||
float Analyze(DeinterleavedView<const float> frame);
|
||||
|
||||
private:
|
||||
const int vad_reset_period_frames_;
|
||||
int frame_size_;
|
||||
const int frame_size_;
|
||||
int time_to_vad_reset_;
|
||||
PushResampler<float> resampler_;
|
||||
std::unique_ptr<MonoVad> vad_;
|
||||
std::vector<float> resampled_buffer_;
|
||||
PushResampler<float> resampler_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
Reference in New Issue
Block a user