Basic API
[JuliusLib API]

Collaboration diagram for Basic API:
Basic functions to start-up and initialize engines. More...

Functions

void j_enable_debug_message ()
 Enable debug messages in JuliusLib to log.
void j_disable_debug_message ()
 Disable debug messages in JuliusLib to log.
void j_enable_verbose_message ()
 Enable verbose messages in JuliusLib to log.
void j_disable_verbose_message ()
 Disable verbose messages in JuliusLib to log.
boolean j_adin_init (Recog *recog)
 Initialize and setup A/D-in device specified by the configuration for recognition.
boolean j_adin_init_user (Recog *recog, void *arg)
 Initialize function when using user-defined A/D-in function.
char * j_get_current_filename ()
 Return current input speech file name.
void j_recog_info (Recog *recog)
 Output all configurations and system informations into log.
void j_output_argument_help (FILE *fp)
 Output help document.
int j_open_stream (Recog *recog, char *file_or_dev_name)
 Open input stream.
int j_recognize_stream (Recog *recog)
 Recognize an input stream.
boolean j_add_option (char *fmt, int argnum, int reqargnum, char *desc, boolean(*func)(Jconf *jconf, char *arg[], int argnum))
 Add a user-defined option to Julius.

Detailed Description

Basic functions to start-up and initialize engines.


Function Documentation

boolean j_adin_init ( Recog recog  ) 

Initialize and setup A/D-in device specified by the configuration for recognition.

When threading is enabled for the device, A/D-in thread will start inside this function.

Parameters:
recog [in] engine instance
Returns:
TRUE on success, FALSE on failure.

Definition at line 521 of file jfunc.c.

Referenced by main().

Here is the caller graph for this function:

boolean j_adin_init_user ( Recog recog,
void *  arg 
)

Initialize function when using user-defined A/D-in function.

Almost the same with j_adin_init() except that it does not initialize an input device.

Parameters:
recog [in] engine instance
arg [in] argument
Returns:
TRUE on success, else FALSE on error.

Definition at line 565 of file jfunc.c.

char* j_get_current_filename (  ) 

Return current input speech file name.

Invalid when MFCC input.

Returns:
the file name.

Definition at line 602 of file jfunc.c.

Referenced by main_recognition_stream_loop().

Here is the caller graph for this function:

void j_recog_info ( Recog recog  ) 

Output all configurations and system informations into log.

Parameters:
recog [in] engine instance

Definition at line 626 of file jfunc.c.

Referenced by main().

Here is the caller graph for this function:

void j_output_argument_help ( FILE *  fp  ) 

Output help document.

Parameters:
fp [in] file pointer to output help

Definition at line 45 of file m_usage.c.

Referenced by opt_help().

Here is the caller graph for this function:

int j_open_stream ( Recog recog,
char *  file_or_dev_name 
)

Open input stream.

Parameters:
recog [i/o] engine instance
file_or_dev_name [in] file or device name of the device
Returns:
0 on success, -1 on error, -2 on decice initializatino error.

Definition at line 449 of file recogmain.c.

Referenced by main(), and main_recognition_stream_loop().

Here is the caller graph for this function:

int j_recognize_stream ( Recog recog  ) 

Recognize an input stream.

This function repeat recognition process for the whole input stream, using segmentation and detection if required. It ends when the whole input has been processed.

When a recognition stop is requested from application, the following callbacks will be called in turn: CALLBACK_EVENT_PAUSE, CALLBACK_PAUSE_FUNCTION, CALLBACK_EVENT_RESUME. After finishing executing all functions in these callbacks, recognition will restart. If you have something to be processed while recognition stops, you should write the function as callback to CALLBACK_PAUSE_FUNCTION. Note that recognition will restart immediately after all functions registered in CALLBACK_PAUSE_FUNCTION has been finished.

Parameters:
recog [i/o] engine instance
Returns:
0 when finished recognizing all the input stream to the end, or -1 on error.

Definition at line 1218 of file recogmain.c.

Referenced by main(), and main_recognition_stream_loop().

Here is the caller graph for this function:

boolean j_add_option ( char *  fmt,
int  argnum,
int  reqargnum,
char *  desc,
boolean(*)(Jconf *jconf, char *arg[], int argnum)  func 
)

Add a user-defined option to Julius.

When reqargnum is lower than argnum, the first (reqargnum) arguments are required and the rest (argnum - reqargnum) options are optional.

Parameters:
fmt [in] option string (should begin with '-')
argnum [in] total number of argument for this option (including optional)
reqargnum [in] number of required argument
desc [in] description string for help
func [in] option handling function
Returns:
TRUE on success, FALSE on failure

Definition at line 129 of file useropt.c.


Generated on Tue Dec 18 16:01:46 2007 for Julius by  doxygen 1.5.4