Main Page
Classes
Files
File List
File Members
include
ascr.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
* ascr.h -- Acoustic (senone) scores
39
*
40
* **********************************************
41
* CMU ARPA Speech Project
42
*
43
* Copyright (c) 1999 Carnegie Mellon University.
44
* ALL RIGHTS RESERVED.
45
* **********************************************
46
*
47
* HISTORY
48
* $Log$
49
* Revision 1.1 2006/04/05 20:27:30 dhdfu
50
* A Great Reorganzation of header files and executables
51
*
52
* Revision 1.10 2006/02/23 05:19:57 arthchan2003
53
* Merged from branch SPHINX3_5_2_RCI_IRII_BRANCH: Added acoustic scores. 1, change names of sen to senscr. Add functions to clean up ascr's buffers.
54
*
55
* Revision 1.9.4.2 2005/08/02 21:11:33 arthchan2003
56
* Changed sen to senscr, this avoid confusion in align,allphone, decode_anytopo.
57
*
58
* Revision 1.9.4.1 2005/07/24 01:31:03 arthchan2003
59
* add interface to set temporary active array correctly.
60
*
61
* Revision 1.9 2005/06/21 22:32:25 arthchan2003
62
* Log. Significant expansion of ascr_t to be the container of all types
63
* of acoustic scores. Implementations of init, report, free functions
64
* are now provided. ascr_shift_one_cache_frame is used to provide a
65
* wrapper for shifting one frame of cache frame in phoneme lookahead.
66
* It is expected to be used later more if more complicated scheme of
67
* lookahead is used.
68
*
69
* Revision 1.5 2005/04/20 03:31:57 archan
70
* Part of refactoring: add ascr_shift_one_cache_frame which could shift one cache frame.
71
*
72
* Revision 1.4 2005/03/30 01:22:46 archan
73
* Fixed mistakes in last updates. Add
74
*
75
*
76
* 19-May-1999 M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
77
* Started.
78
*/
79
80
#include <
s3types.h
>
81
85
#ifndef _S3_ASCR_H_
86
#define _S3_ASCR_H_
87
88
#ifdef __cplusplus
89
extern
"C"
{
90
#endif
91
#if 0
92
}
/* Fool Emacs into not indenting things. */
93
#endif
94
99
typedef
struct
{
100
int32 *
senscr
;
101
int32 *
comsen
;
103
uint8 *
ssid_active
;
104
uint8 *
comssid_active
;
105
uint8 *
sen_active
;
106
uint8 *
rec_sen_active
;
107
int32 **
cache_ci_senscr
;
108
int32 *
cache_best_list
;
110
int32
n_sen
;
111
int32
n_comsen
;
112
int32
n_sseq
;
113
int32
n_comsseq
;
114
int32
pl_win
;
115
int32
n_cisen
;
116
}
ascr_t
;
117
118
123
S3DECODER_EXPORT
124
ascr_t
*
ascr_init
(int32 n_sen,
125
int32 n_comsen,
126
int32 n_sseq,
127
int32 n_comsseq,
128
int32 pl_win,
129
int32 n_cisen
130
);
131
136
void
ascr_report
(
ascr_t
* a
137
) ;
138
142
void
ascr_print_senscr
(
ascr_t
*a
143
);
144
148
S3DECODER_EXPORT
149
void
ascr_free
(
ascr_t
*a
150
);
151
155
void
ascr_shift_one_cache_frame
(
ascr_t
*a,
156
int32 win_efv
157
);
158
162
void
ascr_clear_sen_active
(
ascr_t
*a
164
);
165
169
void
ascr_clear_ssid_active
(
ascr_t
*a
171
);
172
176
void
ascr_clear_comssid_active
(
ascr_t
*a
178
);
179
180
#if 0
181
{
/* Stop indent from complaining */
182
#endif
183
#ifdef __cplusplus
184
}
185
#endif
186
187
188
#endif
189
Generated by
1.8.1.2