ref: 81229a741223e126544acabfd8b1091bdfc1f04f
parent: 71a26567687318d702f7972676faffafe91efa0a
author: Jean-Marc Valin <jmvalin@amazon.com>
date: Fri Oct 29 22:37:09 EDT 2021
Fix the "no lookahead" case
--- a/dnn/lpcnet.c
+++ b/dnn/lpcnet.c
@@ -106,10 +106,12 @@
compute_dense(&gru_b_dense_feature, gru_b_condition, condition);
#ifdef END2END
rc2lpc(lpc, rc);
-#else
+#elif FEATURES_DELAY>0
memcpy(lpc, lpcnet->old_lpc[FEATURES_DELAY-1], LPC_ORDER*sizeof(lpc[0]));
memmove(lpcnet->old_lpc[1], lpcnet->old_lpc[0], (FEATURES_DELAY-1)*LPC_ORDER*sizeof(lpc[0]));
lpc_from_cepstrum(lpcnet->old_lpc[0], features);
+#else
+ lpc_from_cepstrum(lpc, features);
#endif
if (lpcnet->frame_count < 1000) lpcnet->frame_count++;
}
--- a/dnn/lpcnet_private.h
+++ b/dnn/lpcnet_private.h
@@ -27,7 +27,9 @@
NNetState nnet;
int last_exc;
float last_sig[LPC_ORDER];
+#if FEATURES_DELAY>0
float old_lpc[FEATURES_DELAY][LPC_ORDER];
+#endif
float sampling_logit_table[256];
int frame_count;
float deemph_mem;
--
⑨