Home | History | Annotate | Download | only in include
      1 /*---------------------------------------------------------------------------*
      2  *  channorm.h  *
      3  *                                                                           *
      4  *  Copyright 2007, 2008 Nuance Communciations, Inc.                               *
      5  *                                                                           *
      6  *  Licensed under the Apache License, Version 2.0 (the 'License');          *
      7  *  you may not use this file except in compliance with the License.         *
      8  *                                                                           *
      9  *  You may obtain a copy of the License at                                  *
     10  *      http://www.apache.org/licenses/LICENSE-2.0                           *
     11  *                                                                           *
     12  *  Unless required by applicable law or agreed to in writing, software      *
     13  *  distributed under the License is distributed on an 'AS IS' BASIS,        *
     14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
     15  *  See the License for the specific language governing permissions and      *
     16  *  limitations under the License.                                           *
     17  *                                                                           *
     18  *---------------------------------------------------------------------------*/
     19 
     20 
     21 
     22 
     23 #ifndef __channorm_h
     24 #define __channorm_h
     25 
     26 #ifdef SET_RCSID
     27 static const char channorm_h[] = "$Id: channorm.h,v 1.1.10.4 2007/08/31 17:44:52 dahan Exp $";
     28 #endif
     29 
     30 #include "all_defs.h"
     31 #include "hmm_type.h"
     32 #include "specnorm.h"
     33 
     34 
     35 typedef struct
     36 {
     37   int dim;
     38   int init[MAX_CHAN_DIM];              /*  Values located in the .CMN file */
     39   int target[MAX_CHAN_DIM];            /*  Values located in the .TMN file */
     40   int adjust[MAX_CHAN_DIM];
     41   int adj_valid;
     42   imeldata imelda_adjust[MAX_CHAN_DIM];
     43 }
     44 norm_info;
     45 
     46 norm_info *create_channel_normalization(void);
     47 void destroy_channel_normalization(norm_info *channorm);
     48 void apply_channel_normalization(norm_info *channorm, imeldata *fram,
     49                                  int dimen);
     50 void apply_channel_normalization_in_imelda(norm_info *channorm,
     51     imeldata *outframe,
     52     imeldata *frame, int dimen);
     53 void estimate_normalization_parameters(norm_info *channorm,
     54                                        spect_dist_info **chandata, int dimen);
     55 void setup_channel_normalization(norm_info *channorm,
     56                                  spect_dist_info **chandata, int dimen,
     57                                  int forget_factor);
     58 void clear_channel_normalization(spect_dist_info **chandata, int dimen);
     59 int load_channel_parameters(char *basename, norm_info *channorm);
     60 
     61 void setup_ambient_estimation(spect_dist_info **backchan, int dimen,
     62                               int forget_factor);
     63 void clear_ambient_estimation(spect_dist_info **backchan, int dimen);
     64 
     65 
     66 #endif
     67