1 /*
2  * Copyright (C) 2015-2020 Alibaba Group Holding Limited
3  */
4 #ifndef __SPEECH_AEC2_H__
5 #define __SPEECH_AEC2_H__
6 
7 #include "plat_types.h"
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 typedef struct
14 {
15     int32_t     bypass;
16     int32_t     enEAecEnable;
17     int32_t     enHpfEnable;
18     int32_t     enAfEnable;
19     int32_t     enNsEnable;
20     int32_t     enNlpEnable;
21     int32_t     enCngEnable;
22     int32_t     shwDelayLength;
23     float       shwNlpBandSortIdx;
24     float       shwNlpBandSortIdxLow;
25     float       shwNlpTargetSupp;
26     float       shwNlpMinOvrd;
27 } SpeechAec2Config;
28 
29 struct SpeechAec2State_;
30 
31 typedef struct SpeechAec2State_ SpeechAec2State;
32 
33 SpeechAec2State *speech_aec2_create(int32_t sample_rate, int32_t frame_size, const SpeechAec2Config *cfg);
34 
35 int32_t speech_aec2_destroy(SpeechAec2State *inst);
36 
37 int32_t speech_aec2_set_config(SpeechAec2State *st, const SpeechAec2Config *cfg);
38 
39 int32_t speech_aec2_process(SpeechAec2State *inst, int16_t *pcm_in, int16_t *pcm_ref, int32_t pcm_len);
40 
41 
42 #ifdef __cplusplus
43 }
44 #endif
45 
46 #endif//__BT_SCO_CHAIN_WEBRTC_H__