Frame-by-frame classifier written by Ziad. To be replaced by Yitao's version. More...
Go to the source code of this file.
Classes | |
| struct | class_t |
| class to store the classifier parameters More... | |
Defines | |
| #define | __FRAME_CLASSIFIER__ |
| #define | NUMCLASSES 4 /* Number of classes*/ |
| #define | DIMENSIONS 13 /* Length of the feature vector*/ |
| #define | MAXFRAMES 10000 |
| #define | CLASS_N 0 /* Noise*/ |
| #define | CLASS_O 1 /* Owner speech*/ |
| #define | CLASS_S 2 /* Secondary speech */ |
| #define | CLASS_SIL 3 /* Silence */ |
| #define | PRIOR_N 0.1 /* N */ |
| #define | PRIOR_O 0.4 /* O */ |
| #define | PRIOR_S 0.1 /* S */ |
| #define | PRIOR_SIL 0.4 /* SIL */ |
| #define | VOTEWINDOWLEN |
| #define | CLASSLATENCY |
| #define | POSTPROCESS |
| #define | SWAP_INT(x) |
| #define | SWAP_FLOAT(x) SWAP_INT((int *) x) |
Functions | |
| void | majority_class (class_t *CLASSW, int *classcount, int frame_count) |
| class_t * | classw_initialize (char *mdeffile, char *meanfile, char *varfile, float64 varfloor, char *mixwfile, float64 mixwfloor, int32 precomp, char *senmgau) |
| void | classw_free (class_t *CLASSW) |
| int | classify (float *frame, mgau_model_t *g, int32 priors[NUMCLASSES], s3cipid_t *map) |
| int | postclassify (int *window, int windowlen, int *wincap, int myclass) |
| int | vote (int *window, int windowlen) |
Frame-by-frame classifier written by Ziad. To be replaced by Yitao's version.
| #define __FRAME_CLASSIFIER__ |
| #define CLASS_N 0 /* Noise*/ |
| #define CLASS_O 1 /* Owner speech*/ |
| #define CLASS_S 2 /* Secondary speech */ |
| #define CLASS_SIL 3 /* Silence */ |
| #define CLASSLATENCY |
2 /* Number of latency frames caused by the post processing (voting window) */
| #define DIMENSIONS 13 /* Length of the feature vector*/ |
| #define MAXFRAMES 10000 |
| #define NUMCLASSES 4 /* Number of classes*/ |
| #define POSTPROCESS |
1 /* Enabling/disabling post-processing */
| #define PRIOR_N 0.1 /* N */ |
| #define PRIOR_O 0.4 /* O */ |
| #define PRIOR_S 0.1 /* S */ |
| #define PRIOR_SIL 0.4 /* SIL */ |
| #define SWAP_FLOAT | ( | x | ) | SWAP_INT((int *) x) |
Macro to byteswap a float variable. x = ptr to variable
| #define SWAP_INT | ( | x | ) |
*(x) = ((0x000000ff & (*(x))>>24) | \
(0x0000ff00 & (*(x))>>8) | \
(0x00ff0000 & (*(x))<<8) | \
(0xff000000 & (*(x))<<24))
Macro to byteswap an int variable. x = ptr to variable
| #define VOTEWINDOWLEN |
5 /* Don't change this number as the code expects 5, or you have to change the code*/
| int classify | ( | float * | frame, |
| mgau_model_t * | g, | ||
| int32 | priors[NUMCLASSES], | ||
| s3cipid_t * | map | ||
| ) |
| frame | the frame |
| g | multiple mixture models |
| priors | The prior of each classes |
| map | Map between ci phones and classes |
| void classw_free | ( | class_t * | CLASSW | ) |
| class_t* classw_initialize | ( | char * | mdeffile, |
| char * | meanfile, | ||
| char * | varfile, | ||
| float64 | varfloor, | ||
| char * | mixwfile, | ||
| float64 | mixwfloor, | ||
| int32 | precomp, | ||
| char * | senmgau | ||
| ) |
| mdeffile | The model def file |
| meanfile | The mean file |
| varfile | The variance file |
| varfloor | variance floor |
| mixwfile | The mixture weight |
| mixwfloor | mixture weight floor |
| precomp | pre-computation of values, 0 not to pre-compute, 1 to precompute |
| senmgau | whether it is SCHMM, ".semi." or FCHMM ".cont." |
| void majority_class | ( | class_t * | CLASSW, |
| int * | classcount, | ||
| int | frame_count | ||
| ) |
| int postclassify | ( | int * | window, |
| int | windowlen, | ||
| int * | wincap, | ||
| int | myclass | ||
| ) |
| int vote | ( | int * | window, |
| int | windowlen | ||
| ) |
| window | A window of input |
| windowlen | The window length |
1.7.6.1