/**************************************************************************/ /* File: main.cc */ /**************************************************************************/ /* Project: Continuous Speech Recognition Search Algorithms */ /* Author: Neeraj Deshmukh, Aravind Ganapathiraju */ /* Class: EE 8993 Spring 1996 Date: April 24, 1996 */ /**************************************************************************/ /*======================================================================== This is the driver file for the search engine ========================================================================*/ /*------------------------------------------------------------------------ system and ISIP include files ------------------------------------------------------------------------*/ #include "test.h" main (int argc, char **argv) { if (argc != 5) exit (-1); FILE *fp_mean = fopen (argv[1],"r"); FILE *fp_model = fopen (argv[2],"r"); FILE *fp_in = fopen (argv[3],"r"); FILE *fp_gram = fopen (argv[4],"r"); // define memory for the models // HMM_Model **model = new HMM_Model*[NUM_OF_MODELS]; for (int_2 i = 0; i < NUM_OF_MODELS; i++) { model[i] = new HMM_Model ("",NUM_OF_STATES); } // create the HMM models for each word // create_model_cc ( fp_model, fp_mean, model, 5 , NUM_OF_STATES ); // define a linked list for hypothesis // Score_Hyp *hypoth = new Score_Hyp (); Grammar *lang_grammar = new Grammar (); lang_grammar->read_grammar_cc (fp_gram); build_lattice_cc ( fp_in, lang_grammar, model, hypoth ); //viterbi_beam_cc ( fp_in, lang_grammar, model, hypoth ); find_word_seq_cc ( hypoth,model ); // free memory and close files // delete [] model; delete hypoth; delete lang_grammar; fclose(fp_mean); fclose(fp_model); fclose(fp_in); fclose(fp_gram); }