srch_debug.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
2 /* ====================================================================
3  * Copyright (c) 1999-2004 Carnegie Mellon University. All rights
4  * reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in
15  * the documentation and/or other materials provided with the
16  * distribution.
17  *
18  * This work was supported in part by funding from the Defense Advanced
19  * Research Projects Agency and the National Science Foundation of the
20  * United States of America, and the CMU Sphinx Speech Consortium.
21  *
22  * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
23  * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
24  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
26  * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  *
34  * ====================================================================
35  *
36  */
37 
38 /* srch_debug.h
39  * HISTORY
40  *
41  * $Log$
42  * Revision 1.1 2006/04/05 20:27:30 dhdfu
43  * A Great Reorganzation of header files and executables
44  *
45  * Revision 1.3 2006/02/28 02:06:46 egouvea
46  * Updated MS Visual C++ 6.0 support files. Fixed things that didn't
47  * compile in Visual C++ (declarations didn't match, etc). There are
48  * still some warnings, so this is not final. Also, sorted files in
49  * several Makefile.am.
50  *
51  * Revision 1.2 2006/02/23 15:50:25 arthchan2003
52  * Merged from branch SPHINX3_5_2_RCI_IRII_BRANCH: Fixed dox-doc, Added empty functions into srch_debug.[ch]
53  *
54  * Revision 1.1.4.1 2006/01/16 20:02:08 arthchan2003
55  * Added interfaces for second stage operations
56  *
57  * Revision 1.1 2005/06/22 02:37:41 arthchan2003
58  * Log. A search debugging implementation. Users will only see a text
59  * message provided in this search implementation.
60  *
61  * Revision 1.6 2005/05/11 06:10:39 archan
62  * 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.
63  *
64  *
65  * 17-Mar-2005 A. Chan (archan@cs.cmu.edu) at Carnegie Mellon University
66  * Started. Time switching tree implementation.
67  */
68 
69 #ifndef _SRCH_DEBUG_H_
70 #define _SRCH_DEBUG_H_
71 
72 #include <glist.h>
73 #include "s3types.h"
74 #include "dag.h"
75 #include "lm.h"
76 #include "kb.h"
77 
90 #ifdef __cplusplus
91 extern "C" {
92 #endif
93 #if 0
94 /* Fool Emacs. */
95 }
96 #endif
97 
98 extern struct srch_funcs_s srch_debug_funcs;
99 
100 int srch_debug_init(kb_t *kb,void* srch);
101 int srch_debug_uninit(void* srch);
102 int srch_debug_begin(void* srch);
103 int srch_debug_end(void* srch);
104 int srch_debug_decode(void);
105 int srch_debug_set_lm(void* srch, const char *lmname);
106 int srch_debug_add_lm(void* srch, lm_t *lm, const char *lmname);
107 int srch_debug_delete_lm(void* srch, const char *lmname);
108 int srch_debug_gmm_compute_lv1(void *srch, float32 *feat, int32 cache_idx, int32 wav_idx);
109 int srch_debug_gmm_compute_lv2(void *srch, float32 **feat, int32 wav_idx);
110 int srch_debug_hmm_compute_lv1(void* srch);
111 int srch_debug_hmm_compute_lv2(void *srch, int32 wav_idx);
112 int srch_debug_eval_beams_lv1 (void* srch);
113 int srch_debug_eval_beams_lv2 (void* srch);
114 
115 int srch_debug_propagate_graph_ph_lv1(void* srch);
116 int srch_debug_propagate_graph_wd_lv1(void* srch);
117 int srch_debug_propagate_graph_ph_lv2(void *srch, int32 wav_idx);
118 int srch_debug_propagate_graph_wd_lv2(void *srch, int32 wav_idx);
119 
120 int srch_debug_compute_heuristic(void *srch, int32 win_efv);
121 int srch_debug_frame_windup(void *srch_struct, int32 frmno);
122 int srch_debug_shift_one_cache_frame(void *srch, int32 win_efv);
123 int srch_debug_select_active_gmm(void *srch);
124 int srch_debug_rescoring(void* srch, int32 frmno);
125 
126 glist_t srch_debug_gen_hyp(void* srch_struct
127  );
128 
129 int srch_debug_dump_vithist(void* srch_struct
130  );
131 
132 dag_t* srch_debug_gen_dag(void * srch_struct,
133  glist_t hyp
134  );
135 
136 glist_t srch_debug_bestpath_impl(void * srch_struct,
137  dag_t *dag
138  );
139 
140 int32 srch_debug_dag_dump(void *srch_struct, dag_t *dag);
141 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif /* _SRCH_DEBUG_H_ */