#include <julius/julius.h>
#include <signal.h>
Go to the source code of this file.
Defines | |
#define | GLOBAL_VARIABLE_DEFINE |
Actually make global vars in global.h. | |
Functions | |
void | result_sentence_malloc (RecogProcess *r, int num) |
Allocate storage of recognition results. | |
void | result_sentence_free (RecogProcess *r) |
Free storage of recognition results. | |
void | clear_result (RecogProcess *r) |
Clear all result storages for next input. | |
static int | adin_cut_callback_store_buffer (SP16 *now, int len, Recog *recog) |
adin_go() callback to score triggered inputs to buffer. | |
static int | callback_check_in_adin (Recog *recog) |
callback function periodically called while input. | |
int | j_open_stream (Recog *recog, char *file_or_dev_name) |
Open input stream. | |
static void | result_error (Recog *recog, int status) |
Recognition error handling. | |
static int | j_recognize_stream_core (Recog *recog) |
Execute recognition. | |
int | j_recognize_stream (Recog *recog) |
Recognize an input stream. |
Definition in file recogmain.c.
void result_sentence_malloc | ( | RecogProcess * | r, | |
int | num | |||
) |
Allocate storage of recognition results.
r | [out] recognition process instance | |
num | [in] number of sentences to be output |
Definition at line 208 of file recogmain.c.
void result_sentence_free | ( | RecogProcess * | r | ) |
Free storage of recognition results.
r | [i/o] recognition process instance |
Definition at line 239 of file recogmain.c.
Referenced by clear_result().
void clear_result | ( | RecogProcess * | r | ) |
Clear all result storages for next input.
r | [in] recognition process instance. |
Definition at line 271 of file recogmain.c.
adin_go() callback to score triggered inputs to buffer.
This function records the incomping speech segments detected in adin_go() to recog->speech. This function will be used when recognition runs in buffered mode (= non-realtime mode).
now | [in] input speech samples. | |
len | [in] length of now in samples | |
recog | [i/o] engine instance |
Definition at line 332 of file recogmain.c.
static int callback_check_in_adin | ( | Recog * | recog | ) | [static] |
callback function periodically called while input.
This function will be called periodically from adin_go() while waiting input or processing recognition. It will call user-defined callback registered in CALLBACK_POLL, check for the process status and issue recognition termination request.
recog | [in] engine instance |
Definition at line 390 of file recogmain.c.
static void result_error | ( | Recog * | recog, | |
int | status | |||
) | [static] |
Recognition error handling.
recog | [in] engine instance | |
status | [in] error status to be set |
Definition at line 503 of file recogmain.c.
static int j_recognize_stream_core | ( | Recog * | recog | ) | [static] |
Execute recognition.
This function repeats recognition sequences until the input stream reached its end. It detects speech segment (if needed), recognize the detected segment, output result, and go back to the first.
This function will be stopped and exited if reached end of stream (mostly in case of file input), some error has been occured, or termination requested from application by calling j_request_pause() and j_request_terminate().
recog | [i/o] engine instance |
Definition at line 560 of file recogmain.c.