Julius 4.2
|
音響尤度計算の実行および状態レベルキャッシュ [詳細]
#include <sent/stddefs.h>
#include <sent/speech.h>
#include <sent/htk_hmm.h>
#include <sent/htk_param.h>
#include <sent/hmm.h>
#include <sent/hmm_calc.h>
マクロ定義 | |
#define | LOG_UNDEF (LOG_ZERO - 1) |
Value to be used as the initial cache value. | |
関数 | |
boolean | outprob_cache_init (HMMWork *wrk) |
Initialize the cache data, should be called once on startup. | |
boolean | outprob_cache_prepare (HMMWork *wrk) |
Prepare cache for the next input, by clearing the existing cache. | |
static void | outprob_cache_extend (HMMWork *wrk, int reqframe) |
Expand the cache to time axis if needed. | |
void | outprob_cache_free (HMMWork *wrk) |
Free work area for cache. | |
LOGPROB | outprob_state (HMMWork *wrk, int t, HTK_HMM_State *stateinfo, HTK_Param *param) |
Compute output probability of a state. | |
void | outprob_cd_nbest_init (HMMWork *wrk, int num) |
Initialize work area for outprob_cd_nbest(). | |
void | outprob_cd_nbest_free (HMMWork *wrk) |
Free work area for outprob_cd_nbest(). | |
static LOGPROB | outprob_cd_nbest (HMMWork *wrk, int t, CD_State_Set *lset, HTK_Param *param) |
Return average of N-beat outprob for pseudo state set. | |
static LOGPROB | outprob_cd_max (HMMWork *wrk, int t, CD_State_Set *lset, HTK_Param *param) |
Return maximum outprob of the pseudo state set. | |
static LOGPROB | outprob_cd_avg (HMMWork *wrk, int t, CD_State_Set *lset, HTK_Param *param) |
Return average outprob of the pseudo state set. | |
LOGPROB | outprob_cd (HMMWork *wrk, int t, CD_State_Set *lset, HTK_Param *param) |
Compute the log output probability of a pseudo state set. | |
LOGPROB | outprob (HMMWork *wrk, int t, HMM_STATE *hmmstate, HTK_Param *param) |
Top function to compute the output probability of a HMM state. |
音響尤度計算の実行および状態レベルキャッシュ
HMM の状態の出力確率(対数尤度)を計算します.状態の型(単語末端の pseudo HMM set かどうか)にしたがっていくつか定義されていますが, 全て下位の outprob_state() を呼びます.outprob_state() は 必要な情報を OP_ で始まる大域変数に格納し,calc_outprob_state() を呼び 出します.calc_outprob_state() は関数のポインタであり,実体は tied-mixture モデルの場合 calc_tied_mix(), それ以外の場合は calc_mix() となります. (GMS を使用する場合は gms_state())になります.
状態レベルの音響尤度キャッシュが行なわれます.キャッシュは 状態 x 入力フレームで格納され,必要な長さにしたがって伸長されます.このキャッシュは 第2パスの計算でも用いるため,全時間に渡って記録されています.
なお tied-mixture の場合はコードブックレベルでのキャッシュも同時に 行なわれます.これについては calc_tied_mix.c をご覧下さい.
outprob.c で定義されています。
Initialize the cache data, should be called once on startup.
wrk | [i/o] HMM computation work area |
参照元 outprob_init().
Prepare cache for the next input, by clearing the existing cache.
wrk | [i/o] HMM computation work area |
参照元 outprob_prepare().
static void outprob_cache_extend | ( | HMMWork * | wrk, |
int | reqframe | ||
) | [static] |
Expand the cache to time axis if needed.
wrk | [i/o] HMM computation work area |
reqframe | [in] required frame length |
参照元 outprob_state().
void outprob_cache_free | ( | HMMWork * | wrk | ) |
LOGPROB outprob_state | ( | HMMWork * | wrk, |
int | t, | ||
HTK_HMM_State * | stateinfo, | ||
HTK_Param * | param | ||
) |
Compute output probability of a state.
Set the needed values to the global variables that begins with "OP_", and call calc_outprob_state(). The calc_outprob_state() is actually a function pointer, and the entity is either calc_tied_mix() for tied-mixture model and calc_mix() for others. (If you use GMS, the entity will be gms_state() instead.)
The state-level cache is also consulted here.
wrk | [i/o] HMM computation work area |
t | [in] time frame |
stateinfo | [in] state information to compute the output probability |
param | [in] input parameter vectors |
参照元 next_word(), outprob(), outprob_cd_avg(), outprob_cd_max(), outprob_cd_nbest(), outprob_style(), と start_word().
void outprob_cd_nbest_init | ( | HMMWork * | wrk, |
int | num | ||
) |
Initialize work area for outprob_cd_nbest().
wrk | [i/o] HMM computation work area |
num | [in] number of top states to be calculated. |
参照元 outprob_init().
void outprob_cd_nbest_free | ( | HMMWork * | wrk | ) |
static LOGPROB outprob_cd_nbest | ( | HMMWork * | wrk, |
int | t, | ||
CD_State_Set * | lset, | ||
HTK_Param * | param | ||
) | [static] |
Return average of N-beat outprob for pseudo state set.
wrk | [i/o] HMM computation work area |
t | [in] input frame |
lset | [in] pseudo state set |
param | [in] input parameter data |
参照元 outprob_cd().
static LOGPROB outprob_cd_max | ( | HMMWork * | wrk, |
int | t, | ||
CD_State_Set * | lset, | ||
HTK_Param * | param | ||
) | [static] |
Return maximum outprob of the pseudo state set.
wrk | [i/o] HMM computation work area |
t | [in] input frame |
lset | [in] pseudo state set |
param | [in] input parameter data |
参照元 outprob_cd().
static LOGPROB outprob_cd_avg | ( | HMMWork * | wrk, |
int | t, | ||
CD_State_Set * | lset, | ||
HTK_Param * | param | ||
) | [static] |
Return average outprob of the pseudo state set.
wrk | [i/o] HMM computation work area |
t | [in] input frame |
lset | [in] pseudo state set |
param | [in] input parameter data |
参照元 outprob_cd().
LOGPROB outprob_cd | ( | HMMWork * | wrk, |
int | t, | ||
CD_State_Set * | lset, | ||
HTK_Param * | param | ||
) |
Compute the log output probability of a pseudo state set.
wrk | [i/o] HMM computation work area |
t | [in] input frame |
lset | [in] pseudo state set |
param | [in] input parameter data |
参照元 next_word(), outprob(), outprob_style(), と start_word().
Top function to compute the output probability of a HMM state.
wrk | [i/o] HMM computation work area |
t | [in] input frame |
hmmstate | [in] HMM state |
param | [in] input parameter data |
参照元 scan_word(), と viterbi_segment().