Julius 4.2
関数
User function API
JuliusLib API

ユーザ関数の登録 [詳細]

User function APIのコラボレーション図

関数

boolean j_regist_user_lm_func (PROCESS_LM *lm, LOGPROB(*unifunc)(WORD_INFO *winfo, WORD_ID w, LOGPROB ngram_prob), LOGPROB(*bifunc)(WORD_INFO *winfo, WORD_ID context, WORD_ID w, LOGPROB ngram_prob), LOGPROB(*probfunc)(WORD_INFO *winfo, WORD_ID *contexts, int context_len, WORD_ID w, LOGPROB ngram_prob))
 言語モデル処理インスタンスにユーザ定義の言語スコア付与関数を登録する.
boolean j_regist_user_param_func (Recog *recog, boolean(*user_calc_vector)(MFCCCalc *, SP16 *, int))
 ユーザ定義の特徴量計算関数を使うようエンジンに登録する.

説明

ユーザ関数の登録


関数

boolean j_regist_user_lm_func ( PROCESS_LM lm,
LOGPROB(*)(WORD_INFO *winfo, WORD_ID w, LOGPROB ngram_prob)  unifunc,
LOGPROB(*)(WORD_INFO *winfo, WORD_ID context, WORD_ID w, LOGPROB ngram_prob)  bifunc,
LOGPROB(*)(WORD_INFO *winfo, WORD_ID *contexts, int context_len, WORD_ID w, LOGPROB ngram_prob)  probfunc 
)

言語モデル処理インスタンスにユーザ定義の言語スコア付与関数を登録する.

この関数はエンジンインスタンス生成後から j_final_fusion() が呼ばれる までの間に呼ぶ必要がある. 注意:ユーザ定義の言語スコア関数を使う場合は 実行時オプション "-userlm" も指定する必要があることに注意せよ.

引数:
lm[i/o] LM processing instance
unifunc[in] pointer to the user-defined unigram function
bifunc[in] pointer to the user-defined bi-igram function
probfunc[in] pointer to the user-defined N-gram function
戻り値:
TRUE on success, FALSE on failure.

jfunc.c805 行で定義されています。

boolean j_regist_user_param_func ( Recog recog,
boolean(*)(MFCCCalc *, SP16 *, int)  user_calc_vector 
)

ユーザ定義の特徴量計算関数を使うようエンジンに登録する.

引数:
recog[i/o] engine instance
user_calc_vector[in] pointer to function of parameter extraction
戻り値:
TRUE on success, FALSE on error.

jfunc.c834 行で定義されています。