PocketSphinx
0.6
|
Common code shared between SC and PTM (tied-state) models. More...
#include <sphinxbase/logmath.h>
#include <sphinxbase/fixpoint.h>
Go to the source code of this file.
Macros | |
#define | MGAU_MIXW_VERSION "1.0" /* Sphinx-3 file format version for mixw */ |
#define | MGAU_PARAM_VERSION "1.0" /* Sphinx-3 file format version for mean/var */ |
#define | NONE -1 |
#define | WORST_DIST (int32)(0x80000000) |
#define | GMMSUB(a, b) ((a)-(b)) |
Subtract GMM component b (assumed to be positive) and saturate. | |
#define | GMMADD(a, b) ((a)+(b)) |
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | LOGMATH_INLINE static |
#define | MAX_NEG_MIXW 159 |
Maximum negated mixture weight value. More... | |
#define | MAX_NEG_ASCR 96 |
Maximum negated acoustic score value. More... | |
Functions | |
LOGMATH_INLINE int | fast_logmath_add (logmath_t *lmath, int mlx, int mly) |
Quickly log-add two negated log probabilities. More... | |
Common code shared between SC and PTM (tied-state) models.
Definition in file tied_mgau_common.h.
#define MAX_NEG_ASCR 96 |
Maximum negated acoustic score value.
Definition at line 85 of file tied_mgau_common.h.
#define MAX_NEG_MIXW 159 |
Maximum negated mixture weight value.
Definition at line 84 of file tied_mgau_common.h.
LOGMATH_INLINE int fast_logmath_add | ( | logmath_t * | lmath, |
int | mlx, | ||
int | mly | ||
) |
Quickly log-add two negated log probabilities.
lmath | The log-math object |
mlx | A negative log probability (0 < mlx < 255) |
mly | A negative log probability (0 < mly < 255) |
We can do some extra-fast log addition since we know that mixw+ascr is always less than 256 and hence x-y is also always less than 256. This relies on some cooperation from logmath_t which will never produce a logmath table smaller than 256 entries.
Note that the parameters are negated log probabilities (and hence, are positive numbers), as is the return value. This is the key to the "fastness" of this function.
Definition at line 105 of file tied_mgau_common.h.