メインページ | モジュール | データ構造 | Directories | ファイル一覧 | データフィールド | グローバル | 関連ページ

write_binhmm.c

HMM 定義をバイナリ形式のファイルへ書き出す [詳細]

#include <sent/stddefs.h>
#include <sent/htk_param.h>
#include <sent/htk_hmm.h>

write_binhmm.cのインクルード依存関係図

ソースコードを見る。

関数

static void wrt (FILE *fp, void *buf, size_t unitbyte, int unitnum)
static void wrt_str (FILE *fp, char *str)
static void wt_header (FILE *fp)
static void wt_opt (FILE *fp, HTK_HMM_Options *opt)
static void wt_type (FILE *fp, HTK_HMM_INFO *hmm)
static int qsort_tr_index (HTK_HMM_Trans **t1, HTK_HMM_Trans **t2)
static void wt_trans (FILE *fp, HTK_HMM_INFO *hmm)
 Write all transition matrix data.
static unsigned int search_trid (HTK_HMM_Trans *t)
static int qsort_vr_index (HTK_HMM_Var **v1, HTK_HMM_Var **v2)
static void wt_var (FILE *fp, HTK_HMM_INFO *hmm)
 Write all variance data.
static unsigned int search_vid (HTK_HMM_Var *v)
static int qsort_dens_index (HTK_HMM_Dens **d1, HTK_HMM_Dens **d2)
static void wt_dens (FILE *fp, HTK_HMM_INFO *hmm)
 Write all mixture density data.
static unsigned int search_did (HTK_HMM_Dens *d)
static void tmix_list_callback (void *p)
static int qsort_tm_index (GCODEBOOK **tm1, GCODEBOOK **tm2)
static void wt_tmix (FILE *fp, HTK_HMM_INFO *hmm)
 Write all codebook data.
static unsigned int search_tmid (GCODEBOOK *tm)
static int qsort_st_index (HTK_HMM_State **s1, HTK_HMM_State **s2)
static void wt_state (FILE *fp, HTK_HMM_INFO *hmm)
 Write all state data.
static unsigned int search_stid (HTK_HMM_State *s)
static void wt_data (FILE *fp, HTK_HMM_INFO *hmm)
 Write all model data.
boolean write_binhmm (FILE *fp, HTK_HMM_INFO *hmm)

変数

static char * binhmm_header = BINHMM_HEADER
 Header string.
static HTK_HMM_Trans ** tr_index
 Sorted data pointers for mapping from pointer to id.
static unsigned int tr_num
 Length of above.
static HTK_HMM_Var ** vr_index
 Sorted data pointers for mapping from pointer to id.
static unsigned int vr_num
 Length of above.
static HTK_HMM_Dens ** dens_index
 Sorted data pointers for mapping from pointer to id.
static unsigned int dens_num
 Length of above.
static GCODEBOOK ** tm_index
 Sorted data pointers for mapping from pointer to id.
static unsigned int tm_num
 Length of above.
static unsigned int tm_idx
 Current index.
static HTK_HMM_State ** st_index
 Sorted data pointers for mapping from pointer to id.
static unsigned int st_num
 Length of above.


説明

HMM 定義をバイナリ形式のファイルへ書き出す

作者:
Akinobu LEE
日付:
Wed Feb 16 06:03:36 2005
Julius は独自のバイナリ形式の HMM 定義ファイルをサポートしています. HTKのアスキー形式の HMM 定義ファイルからバイナリ形式への変換は, 附属のツール mkbinhmm で行ないます.このバイナリ形式は,HTK の バイナリ形式とは非互換ですので注意して下さい.

Revision
1.1.1.1

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


関数

static void wrt FILE *  fp,
void *  buf,
size_t  unitbyte,
int  unitnum
[static]
 

Binary write function with byte swap (assume file is BIG ENDIAN)

引数:
fp [in] file pointer
buf [in] data to write
unitbyte [in] size of a unit in bytes
unitnum [in] number of unit to write

write_binhmm.c49 行で定義されています。

参照元 ngram_write_bin(), write_header(), wrt_str(), wt_data(), wt_dens(), wt_opt(), wt_state(), wt_tmix(), wt_trans(), wt_type(), と wt_var().

static void wrt_str FILE *  fp,
char *  str
[static]
 

Write a string, teminating at NULL.

引数:
fp [in] file pointer
str [in] string to write

write_binhmm.c74 行で定義されています。

参照元 wt_data(), wt_dens(), wt_header(), wt_state(), wt_tmix(), wt_trans(), と wt_var().

static void wt_header FILE *  fp  )  [static]
 

Write header string as binary HMM file.

引数:
fp [in] file pointer

write_binhmm.c93 行で定義されています。

参照元 write_binhmm().

static void wt_opt FILE *  fp,
HTK_HMM_Options opt
[static]
 

Write HMM option specifications

引数:
fp [in] file pointer
opt [out] pointer to the HMM option structure that holds the values.

write_binhmm.c106 行で定義されています。

参照元 write_binhmm().

static void wt_type FILE *  fp,
HTK_HMM_INFO hmm
[static]
 

Write HMM type of mixture tying.

引数:
fp [in] file pointer
hmm [out] pointer to the writing HMM definition data

write_binhmm.c123 行で定義されています。

参照元 write_binhmm().

static int qsort_tr_index HTK_HMM_Trans **  t1,
HTK_HMM_Trans **  t2
[static]
 

qsort callback function to sort transition pointers by their address for indexing.

引数:
t1 [in] data 1
t2 [in] data 2
戻り値:
value required for qsort.

write_binhmm.c144 行で定義されています。

参照元 wt_trans().

static void wt_trans FILE *  fp,
HTK_HMM_INFO hmm
[static]
 

Write all transition matrix data.

The pointers of all transition matrixes are first gathered, sorted by the address. Then the transition matrix data are written by the sorted order. The index will be used later to convert any pointer reference to a transition matrix into scholar id.

引数:
fp [in] file pointer
hmm [in] writing HMM definition data

write_binhmm.c163 行で定義されています。

参照元 write_binhmm().

static unsigned int search_trid HTK_HMM_Trans t  )  [static]
 

Binary search function to convert transition matrix pointer to a scholar ID.

引数:
t [in] pointer to a transition matrix
戻り値:
the corresponding scholar ID.

write_binhmm.c197 行で定義されています。

参照元 wt_data().

static int qsort_vr_index HTK_HMM_Var **  v1,
HTK_HMM_Var **  v2
[static]
 

qsort callback function to sort variance pointers by their address for indexing.

引数:
v1 [in] data 1
v2 [in] data 2
戻り値:
value required for qsort.

write_binhmm.c229 行で定義されています。

参照元 wt_var().

static void wt_var FILE *  fp,
HTK_HMM_INFO hmm
[static]
 

Write all variance data.

The pointers of all variance vectors are first gathered, sorted by the address. Then the variance vectors are written by the sorted order. The index will be used later to convert any pointer reference to a variance vector into scholar id.

引数:
fp [in] file pointer
hmm [in] writing HMM definition data

write_binhmm.c248 行で定義されています。

参照元 write_binhmm().

static unsigned int search_vid HTK_HMM_Var v  )  [static]
 

Binary search function to convert variance pointer to a scholar ID.

引数:
v [in] pointer to a variance data
戻り値:
the corresponding scholar ID.

write_binhmm.c278 行で定義されています。

参照元 wt_dens().

static int qsort_dens_index HTK_HMM_Dens **  d1,
HTK_HMM_Dens **  d2
[static]
 

qsort callback function to sort density pointers by their address for indexing.

引数:
d1 [in] data 1
d2 [in] data 2
戻り値:
value required for qsort.

write_binhmm.c310 行で定義されています。

参照元 wt_dens().

static void wt_dens FILE *  fp,
HTK_HMM_INFO hmm
[static]
 

Write all mixture density data.

The pointers of all mixture densities are first gathered, sorted by the address. Then the densities are written by the sorted order. The pointers to the lower structure (variance etc.) in the data are written in a corresponding scholar id. The pointer index of this data will be used later to convert any pointer reference to a density data into scholar id.

引数:
fp [in] file pointer
hmm [in] writing HMM definition data

write_binhmm.c331 行で定義されています。

参照元 write_binhmm().

static unsigned int search_did HTK_HMM_Dens d  )  [static]
 

Binary search function to convert density pointer to a scholar ID.

引数:
d [in] pointer to a mixture density
戻り値:
the corresponding scholar ID.

write_binhmm.c366 行で定義されています。

参照元 wt_state(), と wt_tmix().

static void tmix_list_callback void *  p  )  [static]
 

Traverse callback function to store pointers in tm_index.

引数:
p [in] pointer to the codebook data

write_binhmm.c395 行で定義されています。

参照元 wt_tmix().

static int qsort_tm_index GCODEBOOK **  tm1,
GCODEBOOK **  tm2
[static]
 

qsort callback function to sort density pointers by their address for indexing.

引数:
tm1 [in] data 1
tm2 [in] data 2
戻り値:
value required for qsort.

write_binhmm.c412 行で定義されています。

参照元 wt_tmix().

static void wt_tmix FILE *  fp,
HTK_HMM_INFO hmm
[static]
 

Write all codebook data.

The pointers of all codebook densities are first gathered, sorted by the address. Then the densities are written by the sorted order. The pointers to the lower structure (mixture etc.) in the data are written by the corresponding scholar id. The pointer index of this data will be used later to convert any pointer reference to a codebook into scholar id.

引数:
fp [in] file pointer
hmm [in] writing HMM definition data

write_binhmm.c433 行で定義されています。

参照元 write_binhmm().

static unsigned int search_tmid GCODEBOOK tm  )  [static]
 

Binary search function to convert codebook pointer to a scholar ID.

引数:
tm [in] pointer to a codebook
戻り値:
the corresponding scholar ID.

write_binhmm.c473 行で定義されています。

参照元 wt_state().

static int qsort_st_index HTK_HMM_State **  s1,
HTK_HMM_State **  s2
[static]
 

qsort callback function to sort state pointers by their address for indexing.

引数:
s1 [in] data 1
s2 [in] data 2
戻り値:
value required for qsort.

write_binhmm.c505 行で定義されています。

参照元 wt_state().

static void wt_state FILE *  fp,
HTK_HMM_INFO hmm
[static]
 

Write all state data.

The pointers of all states are first gathered, sorted by the address. Then the state informations are written by the sorted order. The pointers to the lower structure (mixture etc.) in the data are written in a corresponding scholar id. The pointer index of this data will be used later to convert any pointer reference to a state data into scholar id.

引数:
fp [in] file pointer
hmm [in] writing HMM definition data

write_binhmm.c526 行で定義されています。

参照元 write_binhmm().

static unsigned int search_stid HTK_HMM_State s  )  [static]
 

Binary search function to convert state pointer to a scholar ID.

引数:
s [in] pointer to a state
戻り値:
the corresponding scholar ID.

write_binhmm.c594 行で定義されています。

参照元 wt_data().

static void wt_data FILE *  fp,
HTK_HMM_INFO hmm
[static]
 

Write all model data.

The data of all models are written. The order is not important at this top level, since there are no reference to this data. The pointers to the lower structure (states, transitions, etc.) in the data are written by the corresponding scholar id.

引数:
fp [in] file pointer
hmm [in] writing HMM definition data

write_binhmm.c624 行で定義されています。

参照元 write_binhmm().

boolean write_binhmm FILE *  fp,
HTK_HMM_INFO hmm
 

Top function to write HMM definition data to a binary file.

引数:
fp [in] file pointer
hmm [in] HMM definition structure to be written
戻り値:
TRUE on success, FALSE on failure.

write_binhmm.c665 行で定義されています。


Juliusに対してTue Mar 28 16:22:27 2006に生成されました。  doxygen 1.4.2