SphinxBase
5prealpha
|
Apply Cepstral Mean Normalization (CMN) to the set of input mfc frames. More...
#include <sphinxbase/sphinxbase_export.h>
#include <sphinxbase/prim_type.h>
#include <sphinxbase/fe.h>
Go to the source code of this file.
Data Structures | |
struct | cmn_t |
wrapper of operation of the cepstral mean normalization. More... | |
Macros | |
#define | CMN_WIN_HWM 800 /* #frames after which window shifted */ |
#define | CMN_WIN 500 |
Typedefs | |
typedef enum cmn_type_e | cmn_type_t |
Types of cepstral mean normalization to apply to the features. | |
Enumerations | |
enum | cmn_type_e { CMN_NONE = 0, CMN_BATCH, CMN_LIVE } |
Types of cepstral mean normalization to apply to the features. | |
Functions | |
SPHINXBASE_EXPORT cmn_type_t | cmn_type_from_str (const char *str) |
Convert string representation (from command-line) to cmn_type_t. | |
SPHINXBASE_EXPORT cmn_t * | cmn_init (int32 veclen) |
SPHINXBASE_EXPORT void | cmn (cmn_t *cmn, mfcc_t **mfc, int32 varnorm, int32 n_frame) |
CMN for the whole sentence. More... | |
SPHINXBASE_EXPORT void | cmn_live (cmn_t *cmn, mfcc_t **incep, int32 varnorm, int32 nfr) |
CMN for one block of data, using live mean. More... | |
SPHINXBASE_EXPORT void | cmn_live_update (cmn_t *cmn) |
Update live mean based on observed data. | |
SPHINXBASE_EXPORT void | cmn_live_set (cmn_t *cmn, mfcc_t const *vec) |
Set the live mean. | |
SPHINXBASE_EXPORT void | cmn_live_get (cmn_t *cmn, mfcc_t *vec) |
Get the live mean. | |
SPHINXBASE_EXPORT void | cmn_free (cmn_t *cmn) |
Variables | |
SPHINXBASE_EXPORT const char * | cmn_type_str [] |
String representations of cmn_type_t values. More... | |
Apply Cepstral Mean Normalization (CMN) to the set of input mfc frames.
By subtractingthe mean of the input from each frame. C0 is also included in this process. This function operates on an entire utterance at a time. Hence, the entire utterance must be available beforehand (batchmode).
Definition in file cmn.h.
SPHINXBASE_EXPORT void cmn | ( | cmn_t * | cmn, |
mfcc_t ** | mfc, | ||
int32 | varnorm, | ||
int32 | n_frame | ||
) |
CMN for the whole sentence.
cmn | In/Out: cmn normalization, which contains the cmn_mean and cmn_var) |
mfc | In/Out: mfc[f] = mfc vector in frame f |
varnorm | In: if not FALSE, variance normalize the input vectors to have unit variance (along each dimension independently); Irrelevant if no cmn is performed |
n_frame | In: Number of frames of mfc vectors |
Definition at line 100 of file cmn.c.
Referenced by cmn_live(), cmn_live_get(), cmn_live_set(), cmn_live_update(), and feat_init().
SPHINXBASE_EXPORT void cmn_live | ( | cmn_t * | cmn, |
mfcc_t ** | incep, | ||
int32 | varnorm, | ||
int32 | nfr | ||
) |
CMN for one block of data, using live mean.
cmn | In/Out: cmn normalization, which contains the cmn_mean and cmn_var) |
incep | In/Out: mfc[f] = mfc vector in frame f |
varnorm | This flag should always be 0 for live |
nfr | Number of incoming frames |
Definition at line 145 of file cmn_live.c.
SPHINXBASE_EXPORT const char* cmn_type_str[] |
String representations of cmn_type_t values.
Definition at line 59 of file cmn.c.
Referenced by cmn_type_from_str(), and feat_init().