\doxysection{cmn.\+h}
\label{cmn_8h_source}\index{include/sphinxbase/cmn.h@{include/sphinxbase/cmn.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*\ -\/*-\/\ c-\/basic-\/offset:\ 4;\ indent-\/tabs-\/mode:\ nil\ -\/*-\/\ */}}
\DoxyCodeLine{00002\ \textcolor{comment}{/*\ ====================================================================}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *\ Copyright\ (c)\ 1999-\/2004\ Carnegie\ Mellon\ University.\ \ All\ rights}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *\ reserved.}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ Redistribution\ and\ use\ in\ source\ and\ binary\ forms,\ with\ or\ without}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ modification,\ are\ permitted\ provided\ that\ the\ following\ conditions}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ are\ met:}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *\ 1.\ Redistributions\ of\ source\ code\ must\ retain\ the\ above\ copyright}}
\DoxyCodeLine{00011\ \textcolor{comment}{\ *\ \ \ \ notice,\ this\ list\ of\ conditions\ and\ the\ following\ disclaimer.\ }}
\DoxyCodeLine{00012\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00013\ \textcolor{comment}{\ *\ 2.\ Redistributions\ in\ binary\ form\ must\ reproduce\ the\ above\ copyright}}
\DoxyCodeLine{00014\ \textcolor{comment}{\ *\ \ \ \ notice,\ this\ list\ of\ conditions\ and\ the\ following\ disclaimer\ in}}
\DoxyCodeLine{00015\ \textcolor{comment}{\ *\ \ \ \ the\ documentation\ and/or\ other\ materials\ provided\ with\ the}}
\DoxyCodeLine{00016\ \textcolor{comment}{\ *\ \ \ \ distribution.}}
\DoxyCodeLine{00017\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00018\ \textcolor{comment}{\ *\ This\ work\ was\ supported\ in\ part\ by\ funding\ from\ the\ Defense\ Advanced\ }}
\DoxyCodeLine{00019\ \textcolor{comment}{\ *\ Research\ Projects\ Agency\ and\ the\ National\ Science\ Foundation\ of\ the\ }}
\DoxyCodeLine{00020\ \textcolor{comment}{\ *\ United\ States\ of\ America,\ and\ the\ CMU\ Sphinx\ Speech\ Consortium.}}
\DoxyCodeLine{00021\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00022\ \textcolor{comment}{\ *\ THIS\ SOFTWARE\ IS\ PROVIDED\ BY\ CARNEGIE\ MELLON\ UNIVERSITY\ \`{}\`{}AS\ IS''\ AND\ }}
\DoxyCodeLine{00023\ \textcolor{comment}{\ *\ ANY\ EXPRESSED\ OR\ IMPLIED\ WARRANTIES,\ INCLUDING,\ BUT\ NOT\ LIMITED\ TO,\ }}
\DoxyCodeLine{00024\ \textcolor{comment}{\ *\ THE\ IMPLIED\ WARRANTIES\ OF\ MERCHANTABILITY\ AND\ FITNESS\ FOR\ A\ PARTICULAR}}
\DoxyCodeLine{00025\ \textcolor{comment}{\ *\ PURPOSE\ ARE\ DISCLAIMED.\ \ IN\ NO\ EVENT\ SHALL\ CARNEGIE\ MELLON\ UNIVERSITY}}
\DoxyCodeLine{00026\ \textcolor{comment}{\ *\ NOR\ ITS\ EMPLOYEES\ BE\ LIABLE\ FOR\ ANY\ DIRECT,\ INDIRECT,\ INCIDENTAL,}}
\DoxyCodeLine{00027\ \textcolor{comment}{\ *\ SPECIAL,\ EXEMPLARY,\ OR\ CONSEQUENTIAL\ DAMAGES\ (INCLUDING,\ BUT\ NOT\ }}
\DoxyCodeLine{00028\ \textcolor{comment}{\ *\ LIMITED\ TO,\ PROCUREMENT\ OF\ SUBSTITUTE\ GOODS\ OR\ SERVICES;\ LOSS\ OF\ USE,\ }}
\DoxyCodeLine{00029\ \textcolor{comment}{\ *\ DATA,\ OR\ PROFITS;\ OR\ BUSINESS\ INTERRUPTION)\ HOWEVER\ CAUSED\ AND\ ON\ ANY\ }}
\DoxyCodeLine{00030\ \textcolor{comment}{\ *\ THEORY\ OF\ LIABILITY,\ WHETHER\ IN\ CONTRACT,\ STRICT\ LIABILITY,\ OR\ TORT\ }}
\DoxyCodeLine{00031\ \textcolor{comment}{\ *\ (INCLUDING\ NEGLIGENCE\ OR\ OTHERWISE)\ ARISING\ IN\ ANY\ WAY\ OUT\ OF\ THE\ USE\ }}
\DoxyCodeLine{00032\ \textcolor{comment}{\ *\ OF\ THIS\ SOFTWARE,\ EVEN\ IF\ ADVISED\ OF\ THE\ POSSIBILITY\ OF\ SUCH\ DAMAGE.}}
\DoxyCodeLine{00033\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00034\ \textcolor{comment}{\ *\ ====================================================================}}
\DoxyCodeLine{00035\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00036\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00037\ \textcolor{comment}{/*}}
\DoxyCodeLine{00038\ \textcolor{comment}{\ *\ cmn.h\ -\/-\/\ Various\ forms\ of\ cepstral\ mean\ normalization}}
\DoxyCodeLine{00039\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00040\ \textcolor{comment}{\ *\ **********************************************}}
\DoxyCodeLine{00041\ \textcolor{comment}{\ *\ CMU\ ARPA\ Speech\ Project}}
\DoxyCodeLine{00042\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00043\ \textcolor{comment}{\ *\ Copyright\ (c)\ 1999\ Carnegie\ Mellon\ University.}}
\DoxyCodeLine{00044\ \textcolor{comment}{\ *\ ALL\ RIGHTS\ RESERVED.}}
\DoxyCodeLine{00045\ \textcolor{comment}{\ *\ **********************************************}}
\DoxyCodeLine{00046\ \textcolor{comment}{\ *\ }}
\DoxyCodeLine{00047\ \textcolor{comment}{\ *\ HISTORY}}
\DoxyCodeLine{00048\ \textcolor{comment}{\ *\ \$Log\$}}
\DoxyCodeLine{00049\ \textcolor{comment}{\ *\ Revision\ 1.1\ \ 2006/04/05\ \ 20:27:30\ \ dhdfu}}
\DoxyCodeLine{00050\ \textcolor{comment}{\ *\ A\ Great\ Reorganzation\ of\ header\ files\ and\ executables}}
\DoxyCodeLine{00051\ \textcolor{comment}{\ *\ }}
\DoxyCodeLine{00052\ \textcolor{comment}{\ *\ Revision\ 1.13\ \ 2006/02/23\ 03:48:27\ \ arthchan2003}}
\DoxyCodeLine{00053\ \textcolor{comment}{\ *\ Resolved\ conflict\ in\ cmn.h}}
\DoxyCodeLine{00054\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00055\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00056\ \textcolor{comment}{\ *\ Revision\ 1.12\ \ 2006/02/22\ 23:43:55\ \ arthchan2003}}
\DoxyCodeLine{00057\ \textcolor{comment}{\ *\ Merged\ from\ the\ branch\ SPHINX3\_5\_2\_RCI\_IRII\_BRANCH:\ Put\ data\ structure\ into\ the\ cmn\_t\ structure.}}
\DoxyCodeLine{00058\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00059\ \textcolor{comment}{\ *\ Revision\ 1.11.4.2\ \ 2005/10/17\ 04:45:57\ \ arthchan2003}}
\DoxyCodeLine{00060\ \textcolor{comment}{\ *\ Free\ stuffs\ in\ cmn\ and\ feat\ corectly.}}
\DoxyCodeLine{00061\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00062\ \textcolor{comment}{\ *\ Revision\ 1.11.4.1\ \ 2005/07/05\ 06:25:08\ \ arthchan2003}}
\DoxyCodeLine{00063\ \textcolor{comment}{\ *\ Fixed\ dox-\/doc.}}
\DoxyCodeLine{00064\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00065\ \textcolor{comment}{\ *\ Revision\ 1.11\ \ 2005/06/21\ 19:28:00\ \ arthchan2003}}
\DoxyCodeLine{00066\ \textcolor{comment}{\ *\ 1,\ Fixed\ doxygen\ documentation.\ 2,\ Added\ \$\ keyword.}}
\DoxyCodeLine{00067\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00068\ \textcolor{comment}{\ *\ Revision\ 1.4\ \ 2005/06/13\ 04:02:56\ \ archan}}
\DoxyCodeLine{00069\ \textcolor{comment}{\ *\ Fixed\ most\ doxygen-\/style\ documentation\ under\ libs3decoder.}}
\DoxyCodeLine{00070\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00071\ \textcolor{comment}{\ *\ Revision\ 1.3\ \ 2005/03/30\ 01:22:46\ \ archan}}
\DoxyCodeLine{00072\ \textcolor{comment}{\ *\ Fixed\ mistakes\ in\ last\ updates.\ Add}}
\DoxyCodeLine{00073\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00074\ \textcolor{comment}{\ *\ }}
\DoxyCodeLine{00075\ \textcolor{comment}{\ *\ 20.Apr.2001\ \ RAH\ (rhoughton@mediasite.com,\ ricky.houghton@cs.cmu.edu)}}
\DoxyCodeLine{00076\ \textcolor{comment}{\ *\ \ \ \ \ \ \ \ \ \ \ \ \ \ Added\ cmn\_free()\ and\ moved\ *mean\ and\ *var\ out\ global\ space\ and\ named\ them\ cmn\_mean\ and\ cmn\_var}}
\DoxyCodeLine{00077\ \textcolor{comment}{\ *\ }}
\DoxyCodeLine{00078\ \textcolor{comment}{\ *\ 28-\/Apr-\/1999\ \ M\ K\ Ravishankar\ (rkm@cs.cmu.edu)\ at\ Carnegie\ Mellon\ University}}
\DoxyCodeLine{00079\ \textcolor{comment}{\ *\ \ \ \ \ \ \ \ \ \ \ \ \ \ Copied\ from\ previous\ version.}}
\DoxyCodeLine{00080\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00081\ }
\DoxyCodeLine{00082\ }
\DoxyCodeLine{00083\ \textcolor{preprocessor}{\#ifndef\ \_S3\_CMN\_H\_}}
\DoxyCodeLine{00084\ \textcolor{preprocessor}{\#define\ \_S3\_CMN\_H\_}}
\DoxyCodeLine{00085\ }
\DoxyCodeLine{00086\ \textcolor{comment}{/*\ Win32/WinCE\ DLL\ gunk\ */}}
\DoxyCodeLine{00087\ \textcolor{preprocessor}{\#include\ <sphinxbase/sphinxbase\_export.h>}}
\DoxyCodeLine{00088\ \textcolor{preprocessor}{\#include\ <sphinxbase/prim\_type.h>}}
\DoxyCodeLine{00089\ \textcolor{preprocessor}{\#include\ <sphinxbase/fe.h>}}
\DoxyCodeLine{00090\ }
\DoxyCodeLine{00091\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00092\ \textcolor{keyword}{extern}\ \textcolor{stringliteral}{"{}C"{}}\ \{}
\DoxyCodeLine{00093\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00094\ \textcolor{preprocessor}{\#if\ 0}}
\DoxyCodeLine{00095\ \textcolor{comment}{/*\ Fool\ Emacs.\ */}}
\DoxyCodeLine{00096\ \}}
\DoxyCodeLine{00097\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00098\ }
\DoxyCodeLine{00110\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{enum}\ cmn\_type\_e\ \{}
\DoxyCodeLine{00111\ \ \ \ \ CMN\_NONE\ =\ 0,}
\DoxyCodeLine{00112\ \ \ \ \ CMN\_CURRENT,}
\DoxyCodeLine{00113\ \ \ \ \ CMN\_PRIOR}
\DoxyCodeLine{00114\ \}\ cmn\_type\_t;}
\DoxyCodeLine{00115\ }
\DoxyCodeLine{00117\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00118\ \textcolor{keyword}{extern}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *cmn\_type\_str[];}
\DoxyCodeLine{00119\ }
\DoxyCodeLine{00121\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00122\ cmn\_type\_t\ cmn\_type\_from\_str(\textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *str);}
\DoxyCodeLine{00123\ }
\DoxyCodeLine{00128\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }\{}
\DoxyCodeLine{00129\ \ \ \ \ mfcc\_t\ *cmn\_mean;\ \ \ }
\DoxyCodeLine{00130\ \ \ \ \ mfcc\_t\ *cmn\_var;\ \ \ \ }
\DoxyCodeLine{00131\ \ \ \ \ mfcc\_t\ *sum;\ \ \ \ \ \ \ \ }
\DoxyCodeLine{00132\ \ \ \ \ int32\ nframe;\ }
\DoxyCodeLine{00133\ \ \ \ \ int32\ veclen;\ }
\DoxyCodeLine{00134\ \}\ cmn\_t;}
\DoxyCodeLine{00135\ }
\DoxyCodeLine{00136\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00137\ cmn\_t*\ cmn\_init(int32\ veclen);}
\DoxyCodeLine{00138\ }
\DoxyCodeLine{00142\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00143\ \textcolor{keywordtype}{void}\ cmn\ (cmn\_t\ *cmn,\ \ \ }
\DoxyCodeLine{00144\ \ \ \ \ \ \ \ \ \ \ mfcc\_t\ **mfc,\ }
\DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ \ \ int32\ varnorm,}
\DoxyCodeLine{00148\ \ \ \ \ \ \ \ \ \ \ int32\ n\_frame\ }
\DoxyCodeLine{00149\ \ \ \ \ \ \ \ \ );}
\DoxyCodeLine{00150\ }
\DoxyCodeLine{00151\ \textcolor{preprocessor}{\#define\ CMN\_WIN\_HWM\ \ \ \ \ 800\ \ \ \ \ }\textcolor{comment}{/*\ \#frames\ after\ which\ window\ shifted\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00152\ \textcolor{preprocessor}{\#define\ CMN\_WIN\ \ \ \ \ \ \ \ \ 500}}
\DoxyCodeLine{00153\ }
\DoxyCodeLine{00157\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00158\ \textcolor{keywordtype}{void}\ cmn\_prior(cmn\_t\ *cmn,\ \ \ \ \ \ \ \ }
\DoxyCodeLine{00160\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ mfcc\_t\ **incep,\ \ }
\DoxyCodeLine{00161\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ varnorm,\ \ \ \ }
\DoxyCodeLine{00162\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int32\ nfr\ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{00163\ \ \ \ \ );}
\DoxyCodeLine{00164\ }
\DoxyCodeLine{00168\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00169\ \textcolor{keywordtype}{void}\ cmn\_prior\_update(cmn\_t\ *cmn);}
\DoxyCodeLine{00170\ }
\DoxyCodeLine{00174\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00175\ \textcolor{keywordtype}{void}\ cmn\_prior\_set(cmn\_t\ *cmn,\ mfcc\_t\ \textcolor{keyword}{const}\ *vec);}
\DoxyCodeLine{00176\ }
\DoxyCodeLine{00180\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00181\ \textcolor{keywordtype}{void}\ cmn\_prior\_get(cmn\_t\ *cmn,\ mfcc\_t\ *vec);}
\DoxyCodeLine{00182\ }
\DoxyCodeLine{00183\ \textcolor{comment}{/*\ RAH,\ free\ previously\ allocated\ memory\ */}}
\DoxyCodeLine{00184\ SPHINXBASE\_EXPORT}
\DoxyCodeLine{00185\ \textcolor{keywordtype}{void}\ cmn\_free\ (cmn\_t\ *cmn);}
\DoxyCodeLine{00186\ }
\DoxyCodeLine{00187\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00188\ \}}
\DoxyCodeLine{00189\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00190\ }
\DoxyCodeLine{00191\ \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
