ref: 5b9b4381eb410107a3b3783ec150f41ae4b535f4
parent: 70ce2bd71bbe1c524c7c800c64812688fd985732
author: Jean-Marc Valin <jmvalin@amazon.com>
date: Tue Dec 20 16:55:28 EST 2022
Add call to clear FEC buffer
--- a/dnn/include/lpcnet.h
+++ b/dnn/include/lpcnet.h
@@ -197,4 +197,6 @@
LPCNET_EXPORT void lpcnet_plc_fec_add(LPCNetPLCState *st, const float *features);
+LPCNET_EXPORT void lpcnet_plc_fec_clear(LPCNetPLCState *st);
+
#endif
--- a/dnn/lpcnet_plc.c
+++ b/dnn/lpcnet_plc.c
@@ -93,6 +93,11 @@
st->fec_fill_pos++;
}
+void lpcnet_plc_fec_clear(LPCNetPLCState *st) {+ st->fec_keep_pos = st->fec_read_pos = st->fec_fill_pos = st-> fec_skip = 0;
+}
+
+
static void compute_plc_pred(PLCNetState *net, float *out, const float *in) { float zeros[3*PLC_MAX_RNN_NEURONS] = {0};float dense_out[PLC_DENSE1_OUT_SIZE];
--
⑨