ref: 9f78e583927f340a2f3a91afb24c8d89218dacc2
parent: 623ac9545c4c336d68580fef532034087d1c0341
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Wed Mar 27 10:06:46 EDT 2019
Make param ordering consistent for lpcnet_synthesize()
--- a/dnn/include/lpcnet.h
+++ b/dnn/include/lpcnet.h
@@ -151,11 +151,11 @@
/** Synthesizes speech from an LPCNet feature vector.
* @param [in] st <tt>LPCNetState*</tt>: Synthesis state
- * @param [out] output <tt>short **</tt>: Synthesized speech
* @param [in] features <tt>const float *</tt>: Compressed packet
+ * @param [out] output <tt>short **</tt>: Synthesized speech
* @param [in] N <tt>int</tt>: Number of samples to generate
* @retval 0 Success
*/
-LPCNET_EXPORT void lpcnet_synthesize(LPCNetState *st, short *output, const float *features, int N);
+LPCNET_EXPORT void lpcnet_synthesize(LPCNetState *st, const float *features, short *output, int N);
#endif
--- a/dnn/lpcnet.c
+++ b/dnn/lpcnet.c
@@ -119,7 +119,7 @@
free(lpcnet);
}
-LPCNET_EXPORT void lpcnet_synthesize(LPCNetState *lpcnet, short *output, const float *features, int N)
+LPCNET_EXPORT void lpcnet_synthesize(LPCNetState *lpcnet, const float *features, short *output, int N)
{
int i;
float condition[FEATURE_DENSE2_OUT_SIZE];
@@ -199,7 +199,7 @@
float features[4][NB_TOTAL_FEATURES];
decode_packet(features, st->vq_mem, buf);
for (k=0;k<4;k++) {
- lpcnet_synthesize(&st->lpcnet_state, &pcm[k*FRAME_SIZE], features[k], FRAME_SIZE);
+ lpcnet_synthesize(&st->lpcnet_state, features[k], &pcm[k*FRAME_SIZE], FRAME_SIZE);
}
return 0;
}
--- a/dnn/lpcnet_demo.c
+++ b/dnn/lpcnet_demo.c
@@ -106,7 +106,7 @@
if (feof(fin)) break;
RNN_COPY(features, in_features, NB_FEATURES);
RNN_CLEAR(&features[18], 18);
- lpcnet_synthesize(net, pcm, features, FRAME_SIZE);
+ lpcnet_synthesize(net, features, pcm, FRAME_SIZE);
fwrite(pcm, sizeof(pcm[0]), FRAME_SIZE, fout);
}
lpcnet_destroy(net);
--- a/dnn/test_lpcnet.c
+++ b/dnn/test_lpcnet.c
@@ -60,7 +60,7 @@
if (feof(fin)) break;
RNN_COPY(features, in_features, NB_FEATURES);
RNN_CLEAR(&features[18], 18);
- lpcnet_synthesize(net, pcm, features, FRAME_SIZE);
+ lpcnet_synthesize(net, features, pcm, FRAME_SIZE);
fwrite(pcm, sizeof(pcm[0]), FRAME_SIZE, fout);
}
fclose(fin);
--
⑨