Update to current webrtc library
This is from the upstream library commit id 3326535126e435f1ba647885ce43a8f0f3d317eb, corresponding to Chromium 88.0.4290.1.
This commit is contained in:
@ -8,17 +8,20 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VOICE_ACTIVITY_DETECTOR_H_
|
||||
#define WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VOICE_ACTIVITY_DETECTOR_H_
|
||||
#ifndef MODULES_AUDIO_PROCESSING_VAD_VOICE_ACTIVITY_DETECTOR_H_
|
||||
#define MODULES_AUDIO_PROCESSING_VAD_VOICE_ACTIVITY_DETECTOR_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/common_audio/resampler/include/resampler.h"
|
||||
#include "webrtc/modules/audio_processing/vad/vad_audio_proc.h"
|
||||
#include "webrtc/modules/audio_processing/vad/common.h"
|
||||
#include "webrtc/modules/audio_processing/vad/pitch_based_vad.h"
|
||||
#include "webrtc/modules/audio_processing/vad/standalone_vad.h"
|
||||
#include "common_audio/resampler/include/resampler.h"
|
||||
#include "modules/audio_processing/vad/common.h"
|
||||
#include "modules/audio_processing/vad/pitch_based_vad.h"
|
||||
#include "modules/audio_processing/vad/standalone_vad.h"
|
||||
#include "modules/audio_processing/vad/vad_audio_proc.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -27,10 +30,9 @@ namespace webrtc {
|
||||
class VoiceActivityDetector {
|
||||
public:
|
||||
VoiceActivityDetector();
|
||||
~VoiceActivityDetector();
|
||||
|
||||
// Processes each audio chunk and estimates the voice probability. The maximum
|
||||
// supported sample rate is 32kHz.
|
||||
// TODO(aluebs): Change |length| to size_t.
|
||||
// Processes each audio chunk and estimates the voice probability.
|
||||
void ProcessChunk(const int16_t* audio, size_t length, int sample_rate_hz);
|
||||
|
||||
// Returns a vector of voice probabilities for each chunk. It can be empty for
|
||||
@ -58,7 +60,7 @@ class VoiceActivityDetector {
|
||||
Resampler resampler_;
|
||||
VadAudioProc audio_processing_;
|
||||
|
||||
rtc::scoped_ptr<StandaloneVad> standalone_vad_;
|
||||
std::unique_ptr<StandaloneVad> standalone_vad_;
|
||||
PitchBasedVad pitch_based_vad_;
|
||||
|
||||
int16_t resampled_[kLength10Ms];
|
||||
@ -67,4 +69,4 @@ class VoiceActivityDetector {
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VAD_VOICE_ACTIVITY_DETECTOR_H_
|
||||
#endif // MODULES_AUDIO_PROCESSING_VAD_VOICE_ACTIVITY_DETECTOR_H_
|
||||
|
Reference in New Issue
Block a user