Julius 4.2
マクロ定義 | 関数
libsent/src/phmm/outprob.c

音響尤度計算の実行および状態レベルキャッシュ [詳細]

#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 をご覧下さい.

作者:
Akinobu LEE
日付:
Fri Feb 18 18:45:21 2005
Revision:
1.4

outprob.c で定義されています。


関数

boolean outprob_cache_init ( HMMWork wrk)

Initialize the cache data, should be called once on startup.

引数:
wrk[i/o] HMM computation work area
戻り値:
TRUE on success, FALSE on failure.

outprob.c78 行で定義されています。

参照元 outprob_init().

boolean outprob_cache_prepare ( HMMWork wrk)

Prepare cache for the next input, by clearing the existing cache.

引数:
wrk[i/o] HMM computation work area
戻り値:
TRUE on success, FALSE on failure.

outprob.c96 行で定義されています。

参照元 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.c117 行で定義されています。

参照元 outprob_state().

void outprob_cache_free ( HMMWork wrk)

Free work area for cache.

引数:
wrk[i/o] HMM computation work area

outprob.c158 行で定義されています。

参照元 outprob_free().

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
戻り値:
output log probability.

outprob.c184 行で定義されています。

参照元 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.c222 行で定義されています。

参照元 outprob_init().

void outprob_cd_nbest_free ( HMMWork wrk)

Free work area for outprob_cd_nbest().

引数:
wrk[i/o] HMM computation work area

outprob.c235 行で定義されています。

参照元 outprob_free().

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 log probability, average of top N states in lset.

outprob.c251 行で定義されています。

参照元 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
戻り値:
maximum output log probability among states in lset.

outprob.c296 行で定義されています。

参照元 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
戻り値:
average output log probability of states in lset.

outprob.c320 行で定義されています。

参照元 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
戻り値:
the computed log output probability.

outprob.c347 行で定義されています。

参照元 next_word(), outprob(), outprob_style(), と start_word().

LOGPROB outprob ( HMMWork wrk,
int  t,
HMM_STATE hmmstate,
HTK_Param param 
)

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
戻り値:
the computed log output probability.

outprob.c378 行で定義されています。

参照元 scan_word(), と viterbi_segment().