adaptor.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  * adaptor.h -- Wrapper for structures of adaptation. 
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.3  2006/02/22 14:48:13  arthchan2003
00053  * Merged from SPHINX3_5_2_RCI_IRII_BRANCH: Added adapt_set_mllr (Moved from kb)
00054  *
00055  *
00056  * Revision 1.1.4.3  2005/09/18 01:12:31  arthchan2003
00057  * Add adapt_set_mllr which is responsible for single stream MLLR switching.
00058  *
00059  * Revision 1.1.4.2  2005/07/05 05:47:59  arthchan2003
00060  * Fixed dox-doc. struct level of documentation are included.
00061  *
00062  * Revision 1.1.4.1  2005/06/27 05:22:19  arthchan2003
00063  * Merged from the HEAD.
00064  *
00065  * Revision 1.2  2005/06/22 08:00:07  arthchan2003
00066  * Completed all doxygen documentation on file description for libs3decoder/libutil/libs3audio and programs.
00067  * Revision 1.2  2005/06/22 08:00:07  arthchan2003
00068  * Completed all doxygen documentation on file description for libs3decoder/libutil/libs3audio and programs.
00069  *
00070  * Revision 1.1  2005/06/21 17:59:44  arthchan2003
00071  * Log: Implementation and Interface of adapt_am_t, a wrapper of
00072  * adaptation capabability of Sphinx 3.  It takes the responsibility from
00073  * kb_t to manage regA, regB and mllr_nclass.  Interfaces are not fully
00074  * completed. So "pointer" symtom code still appears in kb.c
00075  *
00076  * Revision 1.3  2005/06/19 19:41:21  archan
00077  * Sphinx3 to s3.generic: Added multiple regression class for single stream MLLR. Enabled MLLR for livepretend and decode.
00078  *
00079  * Revision 1.2  2005/03/30 01:08:37  archan
00080  * codebase-wide update. Performed an age-old trick: Adding $Log into all .c and .h files. This will make sure the commit message be preprended into a file.
00081  *
00082  * 
00083  * 25-Mar-2005  Arthur Chan (archan@cs.cmu.edu) at Carnegie Mellon Unversity
00084  *              First started. 
00085  */
00086 
00092 #ifndef _ADAPT_H_
00093 #define _ADAPT_H_
00094 
00095 #include <s3types.h>
00096 #include <cont_mgau.h>
00097 #include <mdef.h>
00098 #include <cmd_ln.h>
00099 
00100 #define ADAPTATION_MLLR 0
00101 
00102 #if 0 /* for forward compatibility */
00103 #define ADAPTATION_MAP 1
00104 #define ADAPTATION_PLSA 2
00105 #endif
00106 
00107 #ifdef __cplusplus
00108 extern "C" {
00109 #endif
00110 #if 0
00111 } /* Fool Emacs into not indenting things. */
00112 #endif
00113 
00119 typedef struct {
00120     char* prevmllrfn; 
00121 #if 0
00122     float32** regA; 
00123     float32* regB; 
00124 #endif
00125 
00126     float32*** regA; 
00127     float32** regB; 
00128     int32 mllr_nclass; 
00129 } adapt_am_t ;
00130 
00132 S3DECODER_EXPORT
00133 adapt_am_t* adapt_am_init(void);
00134   
00136 S3DECODER_EXPORT
00137 void adapt_am_free(adapt_am_t *ad);
00138 
00139 S3DECODER_EXPORT
00140 void adapt_set_mllr(adapt_am_t *ad, 
00141                     mgau_model_t *g,  
00142                     const char *mllrfile,  
00143                     const char* cbs2mllr,  
00144                     mdef_t *mdef, 
00145                     cmd_ln_t *config
00146     );
00147 #if 0
00148 { /* Stop indent from complaining */
00149 #endif
00150 #ifdef __cplusplus
00151 
00152 
00153 }
00154 #endif
00155 
00156 #endif

Generated on 7 Mar 2010 by  doxygen 1.6.1