From 2a131ff6fee54c1f67a08a2b4f0f566b76e41bf5 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Mon, 4 Oct 2021 15:59:32 -0400 Subject: [PATCH] Add lpcnet_compute_single_frame_features() to header --- dnn/include/lpcnet.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dnn/include/lpcnet.h b/dnn/include/lpcnet.h index 5fa5bbc0..4b36830b 100644 --- a/dnn/include/lpcnet.h +++ b/dnn/include/lpcnet.h @@ -86,7 +86,7 @@ LPCNET_EXPORT void lpcnet_decoder_destroy(LPCNetDecState *st); /** Decodes a packet of LPCNET_COMPRESSED_SIZE bytes (currently 8) into LPCNET_PACKET_SAMPLES samples (currently 640). * @param [in] st LPCNetDecState*: Decoder state * @param [in] buf const unsigned char *: Compressed packet - * @param [out] pcm short **: Decoded audio + * @param [out] pcm short *: Decoded audio * @retval 0 Success */ LPCNET_EXPORT int lpcnet_decode(LPCNetDecState *st, const unsigned char *buf, short *pcm); @@ -119,7 +119,7 @@ LPCNET_EXPORT void lpcnet_encoder_destroy(LPCNetEncState *st); /** Encodes LPCNET_PACKET_SAMPLES speech samples (currently 640) into a packet of LPCNET_COMPRESSED_SIZE bytes (currently 8). * @param [in] st LPCNetDecState*: Encoder state - * @param [in] pcm short **: Input speech to be encoded + * @param [in] pcm short *: Input speech to be encoded * @param [out] buf const unsigned char *: Compressed packet * @retval 0 Success */ @@ -127,12 +127,19 @@ LPCNET_EXPORT int lpcnet_encode(LPCNetEncState *st, const short *pcm, unsigned c /** Compute features on LPCNET_PACKET_SAMPLES speech samples (currently 640) and output features for 4 10-ms frames at once. * @param [in] st LPCNetDecState*: Encoder state - * @param [in] pcm short **: Input speech to be analyzed + * @param [in] pcm short *: Input speech to be analyzed * @param [out] features float[4][NB_TOTAL_FEATURES]: Four feature vectors * @retval 0 Success */ LPCNET_EXPORT int lpcnet_compute_features(LPCNetEncState *st, const short *pcm, float features[4][NB_TOTAL_FEATURES]); +/** Compute features on LPCNET_FRAME_SIZE speech samples (currently 160) and output features for one 10-ms frame. + * @param [in] st LPCNetDecState*: Encoder state + * @param [in] pcm short *: Input speech to be analyzed + * @param [out] features float[NB_TOTAL_FEATURES]: Four feature vectors + * @retval 0 Success + */ +LPCNET_EXPORT int lpcnet_compute_single_frame_features(LPCNetEncState *st, const short *pcm, float features[NB_TOTAL_FEATURES]); /** Gets the size of an LPCNetState structure. * @returns The size in bytes.