Bump to WebRTC M120 release
Some API deprecation -- ExperimentalAgc and ExperimentalNs are gone. We're continuing to carry iSAC even though it's gone upstream, but maybe we'll want to drop that soon.
This commit is contained in:
@ -15,10 +15,11 @@
|
||||
#include <vector>
|
||||
|
||||
#include "api/array_view.h"
|
||||
#include "modules/audio_processing/agc2/cpu_features.h"
|
||||
#include "modules/audio_processing/agc2/rnn_vad/auto_correlation.h"
|
||||
#include "modules/audio_processing/agc2/rnn_vad/common.h"
|
||||
#include "modules/audio_processing/agc2/rnn_vad/pitch_info.h"
|
||||
#include "modules/audio_processing/agc2/rnn_vad/pitch_search_internal.h"
|
||||
#include "rtc_base/gtest_prod_util.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace rnn_vad {
|
||||
@ -26,21 +27,25 @@ namespace rnn_vad {
|
||||
// Pitch estimator.
|
||||
class PitchEstimator {
|
||||
public:
|
||||
PitchEstimator();
|
||||
explicit PitchEstimator(const AvailableCpuFeatures& cpu_features);
|
||||
PitchEstimator(const PitchEstimator&) = delete;
|
||||
PitchEstimator& operator=(const PitchEstimator&) = delete;
|
||||
~PitchEstimator();
|
||||
// Estimates the pitch period and gain. Returns the pitch estimation data for
|
||||
// 48 kHz.
|
||||
PitchInfo Estimate(rtc::ArrayView<const float, kBufSize24kHz> pitch_buf);
|
||||
// Returns the estimated pitch period at 48 kHz.
|
||||
int Estimate(rtc::ArrayView<const float, kBufSize24kHz> pitch_buffer);
|
||||
|
||||
private:
|
||||
PitchInfo last_pitch_48kHz_;
|
||||
FRIEND_TEST_ALL_PREFIXES(RnnVadTest, PitchSearchWithinTolerance);
|
||||
float GetLastPitchStrengthForTesting() const {
|
||||
return last_pitch_48kHz_.strength;
|
||||
}
|
||||
|
||||
const AvailableCpuFeatures cpu_features_;
|
||||
PitchInfo last_pitch_48kHz_{};
|
||||
AutoCorrelationCalculator auto_corr_calculator_;
|
||||
std::vector<float> pitch_buf_decimated_;
|
||||
rtc::ArrayView<float, kBufSize12kHz> pitch_buf_decimated_view_;
|
||||
std::vector<float> auto_corr_;
|
||||
rtc::ArrayView<float, kNumInvertedLags12kHz> auto_corr_view_;
|
||||
std::vector<float> y_energy_24kHz_;
|
||||
std::vector<float> pitch_buffer_12kHz_;
|
||||
std::vector<float> auto_correlation_12kHz_;
|
||||
};
|
||||
|
||||
} // namespace rnn_vad
|
||||
|
Reference in New Issue
Block a user