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.
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_close_stream (Recog *recog)
 Close 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 539 of file jfunc.c.

Referenced by main().

Here is the caller graph for this function:

char* j_get_current_filename (  ) 

Return current input speech file name.

Invalid when MFCC input.

Returns:
the file name.

Definition at line 579 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 604 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 device initialization error.

Definition at line 493 of file recogmain.c.

Referenced by main(), and main_recognition_stream_loop().

Here is the caller graph for this function:

int j_close_stream ( Recog recog  ) 

Close input stream.

The main recognition loop will be stopped after stream has been closed.

Parameters:
recog [i/o] engine instance
Returns:
0 on success, -1 on general error, -2 on device error.

Definition at line 560 of file recogmain.c.

Referenced by main().

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 1428 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.

Referenced by charconv_add_option(), main(), and record_add_option().

Here is the caller graph for this function:


Generated on Thu Jul 23 12:14:23 2009 for Julius by  doxygen 1.5.1