#include <julius.h>
#include <stdarg.h>
module.cのインクルード依存関係図
マクロ定義 | |
#define | MAXBUFLEN 4096 |
Maximum line length of a message sent from a client. | |
関数 | |
void | main_module_loop () |
モジュールモード時のアプリケーションメインループ. | |
boolean | module_disconnect () |
boolean | module_is_connected () |
void | msock_exec_command (char *command) |
モジュールコマンドを処理する. | |
boolean | module_is_active () |
認識処理の実行可能/実行停止状態を返す.. | |
boolean | module_wants_terminate () |
現在音声認識の即時停止要求があるかどうかを返す. | |
void | module_reset_reload () |
void | msock_process_command () |
void | msock_check_and_process_command () |
int | msock_check_in_adin () |
音声入力待ち中のモジュールコマンド処理のためのコールバック関数. 音声入力待ち中にクライアントモジュールから送られたコマンドを 処理するためのコールバック関数.音声入力処理中に定期的に呼ばれる. もしコマンドがある場合それを処理する.また,即時の認識中断(入力破棄)や 入力の中止を求められている場合はそのようにステータスを音声入力処理関数に 返す. | |
変数 | |
static int | listen_sd = -1 |
Socket to listen to a client. | |
static char | mbuf [MAXBUFLEN] |
Work buffer for message output. | |
static boolean | process_active = TRUE |
static boolean | process_want_terminate = FALSE |
static boolean | process_want_reload = FALSE |
module.c で定義されています。
|
モジュールモード時のアプリケーションメインループ. クライアントプロセスからの接続要求を待ち,要求が来たらソケットを開いて 認識のメインループを呼ぶ.接続したソケットデスクプリタは帯域変数 module_sd に記録される.なお Win32 ではフォークしない. 参照元 main(). |
|
現在接続中のクライアントとの接続を切断する.
参照元 m_errexit(), と m_exit(). |
|
現在クライアントと接続中かどうかを返す
参照元 m_errexit(), と m_exit(). |
|
モジュールコマンドを処理する. クライアントより与えられたコマンドを処理する.この関数はクライアントから コマンドが送られてくるたびに音声認識処理に割り込んで呼ばれる. ステータス等についてはここですぐに応答メッセージを送るが, 文法の追加や削除などは,ここでは受信のみ行い,実際の変更処理 (各文法からのグローバル文法の再構築など)は認識処理の合間に実行される. この文法再構築処理を実際に行うのは multigram_exec() である.
|
|
認識処理の実行可能/実行停止状態を返す.. プロセスが実行可能状態(入力音声のトリガをモニタ中,あるいは現在 音声認識処理を実行中)であれば TRUE を,実行停止状態 (モジュールからのコマンド処理以外の処理を停止しており,入力が あっても無視する)であれば FALSE を返す.
参照元 adin_cut_callback_store_buffer(), と main_recognition_loop(). |
|
現在音声認識の即時停止要求があるかどうかを返す. モジュールコマンド "TERMINATE" や文法変更などで,即時に認識処理を 停止する必要があるかどうかを返す.この関数は音声認識処理の各ループ 内で,即時に停止する必要があるかどうかチェックするために呼ばれる.
参照元 adin_cut_callback_store_buffer(), get_back_trellis(), main_recognition_loop(), と wchmm_fbs(). |
|
process_want_reload フラグをクリアする. |
|
クライアントモジュールからの命令を読み込んで処理する. 命令が無い場合,次のコマンドが来るまで待つ. |
|
現在クライアントモジュールからの命令がバッファにあるか調べ, もしあれば処理する.なければそのまま終了する. 参照元 adin_cut_callback_store_buffer(), と main_recognition_loop(). |
|
音声入力待ち中のモジュールコマンド処理のためのコールバック関数. 音声入力待ち中にクライアントモジュールから送られたコマンドを 処理するためのコールバック関数.音声入力処理中に定期的に呼ばれる. もしコマンドがある場合それを処理する.また,即時の認識中断(入力破棄)や 入力の中止を求められている場合はそのようにステータスを音声入力処理関数に 返す.
|
|
Status flag indicating whether the recognition is alive or not. If TRUE, the process is currently activated, either monitoring an audio input or recognizing the current input. If FALSE, the recognition is now disabled until some activation command has been arrived from client. While disabled, all the inputs are ignored. If set to FALSE in the program, Julius/Julian will stop after the current recognition ends, and enter the disabled status. |
|
If set to TRUE, Julius/Julian stops recognition immediately, terminating the currenct recognition process, and enter into disabled status. |
|
If set to TRUE, Julius/Julian stops recognition softly. If it is performing recognition of the 1st pass, it immediately segments the current input, process the 2nd pass, and output the result. Then it enters the disabled status. |