-
Notifications
You must be signed in to change notification settings - Fork 17
/
WebrtcNS.h
48 lines (36 loc) · 1.02 KB
/
WebrtcNS.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// WebrtcNS.hpp
// VADTEST
//
// Created by zhangyu on 2017/10/23.
// Copyright © 2017年 Michong. All rights reserved.
//
#ifndef WebrtcNS_hpp
#define WebrtcNS_hpp
#include <stdio.h>
namespace webrtc {
class WebrtcNS {
public:
WebrtcNS(int sampleRateHz);
~WebrtcNS();
void processAudio(short **input, short **output, int sampleCount);
//return sub_estimate
int *noise_estimate(int *length, int *estimateValue);
enum NoiseSuppression {
kLow,
kModerate,
kHigh,
kVeryHigh
};
// mode : 0: Mild, 1: Medium , 2: Aggressive
void setLevel(WebrtcNS::NoiseSuppression level);
void reset();
private:
class Suppressor;
int sample_rate_hz_ = 0;
size_t frame_size_samples_ = 0;
Suppressor *suppressors_ = nullptr;
NoiseSuppression level_ = kModerate;
};
}
#endif /* WebrtcNS_hpp */