ascr.h

Go to the documentation of this file.
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  * ascr.h -- Acoustic (senone) scores
00039  * 
00040  * **********************************************
00041  * CMU ARPA Speech Project
00042  *
00043  * Copyright (c) 1999 Carnegie Mellon University.
00044  * ALL RIGHTS RESERVED.
00045  * **********************************************
00046  * 
00047  * HISTORY
00048  * $Log$
00049  * Revision 1.1  2006/04/05  20:27:30  dhdfu
00050  * A Great Reorganzation of header files and executables
00051  * 
00052  * Revision 1.10  2006/02/23 05:19:57  arthchan2003
00053  * 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.
00054  *
00055  * Revision 1.9.4.2  2005/08/02 21:11:33  arthchan2003
00056  * Changed sen to senscr, this avoid confusion in align,allphone, decode_anytopo.
00057  *
00058  * Revision 1.9.4.1  2005/07/24 01:31:03  arthchan2003
00059  * add interface to set temporary active array correctly.
00060  *
00061  * Revision 1.9  2005/06/21 22:32:25  arthchan2003
00062  * Log. Significant expansion of ascr_t to be the container of all types
00063  * of acoustic scores.  Implementations of init, report, free functions
00064  * are now provided. ascr_shift_one_cache_frame is used to provide a
00065  * wrapper for shifting one frame of cache frame in phoneme lookahead.
00066  * It is expected to be used later more if more complicated scheme of
00067  * lookahead is used.
00068  *
00069  * Revision 1.5  2005/04/20 03:31:57  archan
00070  * Part of refactoring: add ascr_shift_one_cache_frame which could shift one cache frame.
00071  *
00072  * Revision 1.4  2005/03/30 01:22:46  archan
00073  * Fixed mistakes in last updates. Add
00074  *
00075  * 
00076  * 19-May-1999  M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University
00077  *              Started.
00078  */
00079 
00080 #include <s3types.h>
00081 
00085 #ifndef _S3_ASCR_H_
00086 #define _S3_ASCR_H_
00087 
00088 #ifdef __cplusplus
00089 extern "C" {
00090 #endif
00091 #if 0
00092 } /* Fool Emacs into not indenting things. */
00093 #endif
00094 
00099 typedef struct {
00100     int32 *senscr;                      
00101     int32 *comsen;              
00103     uint8 *ssid_active;         
00104     uint8 *comssid_active;        
00105     uint8 *sen_active;            
00106     uint8 *rec_sen_active;        
00107     int32 **cache_ci_senscr;      
00108     int32 *cache_best_list;       
00110     int32 n_sen;    
00111     int32 n_comsen; 
00112     int32 n_sseq;   
00113     int32 n_comsseq; 
00114     int32 pl_win;    
00115     int32 n_cisen;    
00116 } ascr_t;
00117 
00118 
00123 S3DECODER_EXPORT
00124 ascr_t *ascr_init (int32 n_sen,         
00125                    int32 n_comsen,      
00126                    int32 n_sseq,        
00127                    int32 n_comsseq,     
00128                    int32 pl_win,        
00129                    int32 n_cisen        
00130     );
00131 
00136 void ascr_report(ascr_t * a 
00137     ) ;
00138 
00142 void ascr_print_senscr(ascr_t *a 
00143     );
00144 
00148 S3DECODER_EXPORT
00149 void ascr_free(ascr_t  *a 
00150     );
00151 
00155 void ascr_shift_one_cache_frame(ascr_t *a,  
00156                                 int32 win_efv 
00157     );
00158      
00162 void ascr_clear_sen_active(ascr_t *a 
00164     );
00165 
00169 void ascr_clear_ssid_active(ascr_t *a 
00171     );
00172                             
00176 void ascr_clear_comssid_active(ascr_t *a 
00178     );
00179 
00180 #if 0
00181 { /* Stop indent from complaining */
00182 #endif
00183 #ifdef __cplusplus
00184 }
00185 #endif
00186 
00187 
00188 #endif
00189 

Generated on 7 Mar 2010 by  doxygen 1.6.1