00001 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */ 00002 /* ==================================================================== 00003 * Copyright (c) 1999-2004 Carnegie Mellon University. All rights 00004 * reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions 00008 * are met: 00009 * 00010 * 1. Redistributions of source code must retain the above copyright 00011 * notice, this list of conditions and the following disclaimer. 00012 * 00013 * 2. Redistributions in binary form must reproduce the above copyright 00014 * notice, this list of conditions and the following disclaimer in 00015 * the documentation and/or other materials provided with the 00016 * distribution. 00017 * 00018 * This work was supported in part by funding from the Defense Advanced 00019 * Research Projects Agency and the National Science Foundation of the 00020 * United States of America, and the CMU Sphinx Speech Consortium. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 00023 * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00024 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00025 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY 00026 * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00027 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00028 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00029 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00030 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00031 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00032 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 * 00034 * ==================================================================== 00035 * 00036 */ 00037 00038 /* srch_debug.h 00039 * HISTORY 00040 * 00041 * $Log$ 00042 * Revision 1.1 2006/04/05 20:27:30 dhdfu 00043 * A Great Reorganzation of header files and executables 00044 * 00045 * Revision 1.3 2006/02/28 02:06:46 egouvea 00046 * Updated MS Visual C++ 6.0 support files. Fixed things that didn't 00047 * compile in Visual C++ (declarations didn't match, etc). There are 00048 * still some warnings, so this is not final. Also, sorted files in 00049 * several Makefile.am. 00050 * 00051 * Revision 1.2 2006/02/23 15:50:25 arthchan2003 00052 * Merged from branch SPHINX3_5_2_RCI_IRII_BRANCH: Fixed dox-doc, Added empty functions into srch_debug.[ch] 00053 * 00054 * Revision 1.1.4.1 2006/01/16 20:02:08 arthchan2003 00055 * Added interfaces for second stage operations 00056 * 00057 * Revision 1.1 2005/06/22 02:37:41 arthchan2003 00058 * Log. A search debugging implementation. Users will only see a text 00059 * message provided in this search implementation. 00060 * 00061 * Revision 1.6 2005/05/11 06:10:39 archan 00062 * Code for lattice and back track pointer table dumping is now wrapped in reg_result_dump. The function is shared across mode 4 and mode 5. Possibly later for mode 3 and mode 6 as well. 00063 * 00064 * 00065 * 17-Mar-2005 A. Chan (archan@cs.cmu.edu) at Carnegie Mellon University 00066 * Started. Time switching tree implementation. 00067 */ 00068 00069 #ifndef _SRCH_DEBUG_H_ 00070 #define _SRCH_DEBUG_H_ 00071 00072 #include <glist.h> 00073 #include "s3types.h" 00074 #include "dag.h" 00075 #include "lm.h" 00076 #include "kb.h" 00077 00090 #ifdef __cplusplus 00091 extern "C" { 00092 #endif 00093 #if 0 00094 /* Fool Emacs. */ 00095 } 00096 #endif 00097 00098 extern struct srch_funcs_s srch_debug_funcs; 00099 00100 int srch_debug_init(kb_t *kb,void* srch); 00101 int srch_debug_uninit(void* srch); 00102 int srch_debug_begin(void* srch); 00103 int srch_debug_end(void* srch); 00104 int srch_debug_decode(void); 00105 int srch_debug_set_lm(void* srch, const char *lmname); 00106 int srch_debug_add_lm(void* srch, lm_t *lm, const char *lmname); 00107 int srch_debug_delete_lm(void* srch, const char *lmname); 00108 int srch_debug_gmm_compute_lv1(void *srch, float32 *feat, int32 cache_idx, int32 wav_idx); 00109 int srch_debug_gmm_compute_lv2(void *srch, float32 **feat, int32 wav_idx); 00110 int srch_debug_hmm_compute_lv1(void* srch); 00111 int srch_debug_hmm_compute_lv2(void *srch, int32 wav_idx); 00112 int srch_debug_eval_beams_lv1 (void* srch); 00113 int srch_debug_eval_beams_lv2 (void* srch); 00114 00115 int srch_debug_propagate_graph_ph_lv1(void* srch); 00116 int srch_debug_propagate_graph_wd_lv1(void* srch); 00117 int srch_debug_propagate_graph_ph_lv2(void *srch, int32 wav_idx); 00118 int srch_debug_propagate_graph_wd_lv2(void *srch, int32 wav_idx); 00119 00120 int srch_debug_compute_heuristic(void *srch, int32 win_efv); 00121 int srch_debug_frame_windup(void *srch_struct, int32 frmno); 00122 int srch_debug_shift_one_cache_frame(void *srch, int32 win_efv); 00123 int srch_debug_select_active_gmm(void *srch); 00124 int srch_debug_rescoring(void* srch, int32 frmno); 00125 00126 glist_t srch_debug_gen_hyp(void* srch_struct 00127 ); 00128 00129 int srch_debug_dump_vithist(void* srch_struct 00130 ); 00131 00132 dag_t* srch_debug_gen_dag(void * srch_struct, 00133 glist_t hyp 00134 ); 00135 00136 glist_t srch_debug_bestpath_impl(void * srch_struct, 00137 dag_t *dag 00138 ); 00139 00140 int32 srch_debug_dag_dump(void *srch_struct, dag_t *dag); 00141 00142 #ifdef __cplusplus 00143 } 00144 #endif 00145 00146 #endif /* _SRCH_DEBUG_H_ */