Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

main.c File Reference

Main function of Julius/Julian. More...

#include <julius.h>
#include <signal.h>

Include dependency graph for main.c:

Go to the source code of this file.

Defines

#define GLOBAL_VARIABLE_DEFINE
 Actually make global vars in global.h.

Functions

int adin_cut_callback_store_buffer (SP16 *now, int len)
 adin_go() callback to score each detected speech segment to buffer.
static char * mfcfilelist_nextfile ()
 Get the next input filename from input list file and return the filename.
void main_recognition_loop ()
 Main recognition process loop.
int main (int argc, char *argv[])
 Main application function.

Variables

static SP16overflowed_samples = NULL
static int overflowed_samplenum


Detailed Description

Main function of Julius/Julian.

Author:
Akinobu Lee
Date:
Wed May 18 15:02:55 2005
Revision
1.2

Definition in file main.c.


Function Documentation

int adin_cut_callback_store_buffer SP16 now,
int  len
 

adin_go() callback to score each detected speech segment to buffer.

This function records the incomping speech segments detected in adin_go() to a buffer speech. This function will be used when recognition runs in buffered mode (= non-realtime mode).

Parameters:
now [in] input speech samples.
len [in] length of now in samples
Returns:
-1 on error (tell adin_go() to terminate), 0 on success (tell adin_go() to continue recording), or 1 when this function requires input segmentation.

Definition at line 103 of file main.c.

Referenced by main_recognition_loop(), and RealTimePipeLine().

static char* mfcfilelist_nextfile  )  [static]
 

Get the next input filename from input list file and return the filename.

This function is used when "-input mfcfile" and "-filelist" is both specified, to get input filenames successively from a given input list file "inputlist_filename". When called, the next filename will be read from the list file and stored in a newly malloced buffer. Blank lines or lines starting with "#" in the list file will be discarded.

This function will only be used when "-filelist" is used when MFCC input is specified ("-input mfcfile"). When speech waveform input, functions in adin_go() will handles the list file instead of this function.

Returns:
pointer to a newly malloced buffer that holds the next input filename, or NULL when no next file availbale (the list file reached EOF).

Definition at line 202 of file main.c.

Referenced by main_recognition_loop().

void main_recognition_loop  ) 
 

Main recognition process loop.

This function is a main loop to execute recognition. First the whole recognition system is setup, and then it enters a main event loop. If the start of speech input is detected, the recognition process of the first pass and second pass will be performed in turn, and the result will be output, and return to the event loop. In module mode, the module commands from module client will also be received and processed here.

Main Recognition Loop

Definition at line 253 of file main.c.

Referenced by main(), and main_module_loop().

int main int  argc,
char *  argv[]
 

Main application function.

This function does some boot-time initialization, and calls event loop. main_module_loop() will be called when module mode, and main_recognition_loop() will be called when normal standalone mode.

Parameters:
argc [in] number of command argument
argv [in] array of command argument
Returns:
0 on normal exit.

Definition at line 818 of file main.c.


Variable Documentation

SP16* overflowed_samples = NULL [static]
 

Temporal buffer to save the recorded-but-unprocessed samples when the length of a speech segment exceeds the limit (i.e. MAXSPEECHLEN samples). They will be restored on the next input at the top of the recording buffer.

Definition at line 66 of file main.c.

Referenced by adin_cut_callback_store_buffer().

int overflowed_samplenum [static]
 

Length of above.

Definition at line 71 of file main.c.

Referenced by adin_cut_callback_store_buffer().


Generated on Tue Mar 28 16:01:56 2006 for Julius by  doxygen 1.4.2