libpncc
A C language library for the extraction of Power Normalized Cepstral Coefficients
Description
libpncc is a library for extracting Power Normalized Cepstral Coefficients (PNCC) as described in [1]. The library comes with a simple extraction front-end (pncc_fe), and can be compiled in single or double precision arithmetic. If you use the library and/or the front-end in a academic paper, do not forget to cite:
Emanuele Principi, Stefano Squartini, Francesco Piazza, Danilo Fuselli, Maurizio Bonifazi, "A Distributed System for Recognizing Home Automation Commands and Distress Calls in the Italian Language," in Proc. of Interspeech, 25-29 Aug. 2013, Lyon, France, pp. 2049-2053.
Compilation (Linux)
libpncc requires FFTW for computing the Fast Fourier Transform and the Discrete Cosine Transform, so please first of all download it and compile it. pncc_fe needs libpncc (obviously), FFTW and libsndfile.
Both libpncc and pncc_fe can be compiled using double (default) or single precision arithmetic. The precision can be changed in libpncc and pncc_fe makefiles: just set the PRECISION variable to DOUBLE to compile in double precision, and to SINGLE to compile in simple precision. The double (single) precision libpncc binaries are name libpnccd (libpnccf), while the double precision pncc_fe binary is named pncc_fe_double (pncc_fe_single).
Compiling libpncc should be quite easy: unzip the tar.gz archive to a directory of your choice, and launch "make". After that, you should find two files in the "lib" subdirectory: libpnccd.a (the static library) and libpnccd.so (the shared library). If you compile in single precision, you will find libpnccf.a and libpnccf.so.
Compiling pncc_fe should be quite easy too:
- unzip the archive to a directory of your choice.
- open the Makefile with a text editor.
- set the libpncc path (LIBPNCC_PATH), FFTW path (LIBFFTW3_PATH) and the libsndfile path (LIBSNDFILE_PATH).
- launch "make" from the command line.
- at the end, you should find pncc_fe_double (or pncc_fe_float) in the bin subdirectory.
Usage
libpncc comes with a very simple API. The following is an example. The config structure contains all the algorithm configuration parameters and their names match the terms in [1].
void main()
{
a3_pncc_config* config;
a3_pncc_t* pncc_state;
a3_real *signal, *pnccs;
config = a3_pncc_get_def_8khz_config(); /* Gets the default library configuration of 8 kHz signals */
pncc_state = a3_pncc_init(config) /* Initializes the library */
/* Load signal */
...
pnccs = a3_pncc_process_utt_alloc(signal, nSamples, pncc_state); /* Processes the nSamples speech signal */
a3_pncc_free(pncc_state); /* Frees the allocated memory */
free(pnccs);
free(signal);
}
For further details, please refer to the included doxygen documentation.
Source code
Contact
Problems? Questions? Bugs? Please send an email to This email address is being protected from spambots. You need JavaScript enabled to view it.
References
[1] C. Kim and R. M. Stern, "Power-normalized coefficients (PNCC) for robust speech recognition," in Proc. of ICASSP, Kyoto, Japan, Mar. 2012, pp. 4101-4104.