1 /* 2 * Copyright (C) 2015-2020 Alibaba Group Holding Limited 3 */ 4 #ifndef __LC_MMSE_NS_H__ 5 #define __LC_MMSE_NS_H__ 6 7 #include <stdint.h> 8 9 #define LC_MMSE_NS_ENABLE_RES_ECHO 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 typedef struct { 16 int32_t bypass; 17 float denoise_dB; 18 } SpeechNs2Config; 19 20 struct SpeechNs2State_; 21 22 typedef struct SpeechNs2State_ SpeechNs2State; 23 24 SpeechNs2State *speech_ns2_create(int32_t sample_rate, int32_t frame_size, const SpeechNs2Config *cfg); 25 26 int32_t speech_ns2_destroy(SpeechNs2State *st); 27 28 int32_t speech_ns2_set_config(SpeechNs2State *st, const SpeechNs2Config *cfg); 29 30 int32_t speech_ns2_process(SpeechNs2State *st, int16_t *pcm_buf, int32_t pcm_len); 31 32 int32_t speech_ns2_set_echo_state(SpeechNs2State *st, void *echo_state); 33 34 int32_t speech_ns2_set_echo_suppress(SpeechNs2State *st, int32_t echo_suppress); 35 36 #ifdef __cplusplus 37 } 38 #endif 39 40 #endif 41