\section{include/sphinxbase/cmn.h File Reference}
\label{cmn_8h}\index{include/sphinxbase/cmn.\+h@{include/sphinxbase/cmn.\+h}}


Apply Cepstral Mean Normalization (C\+MN) to the set of input mfc frames.  


{\ttfamily \#include $<$sphinxbase/sphinxbase\+\_\+export.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/prim\+\_\+type.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/fe.\+h$>$}\newline
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ cmn\+\_\+t}
\begin{DoxyCompactList}\small\item\em wrapper of operation of the cepstral mean normalization. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{cmn_8h_abbf37b74032c295136b4b299ecfcedae}} 
\#define {\bfseries C\+M\+N\+\_\+\+W\+I\+N\+\_\+\+H\+WM}~800     /$\ast$ \#frames after which window shifted $\ast$/
\item 
\mbox{\label{cmn_8h_a500dafed8351d334da9290ec4f3f6ab3}} 
\#define {\bfseries C\+M\+N\+\_\+\+W\+IN}~500
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{cmn_8h_a9384c411b10e9db9745cfb550a5c7652}} 
typedef enum \textbf{ cmn\+\_\+type\+\_\+e} \textbf{ cmn\+\_\+type\+\_\+t}
\begin{DoxyCompactList}\small\item\em Types of cepstral mean normalization to apply to the features. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{cmn_8h_a5bb134416e9e63a317eac20b0102bd59}} 
enum \textbf{ cmn\+\_\+type\+\_\+e} \{ {\bfseries C\+M\+N\+\_\+\+N\+O\+NE} = 0, 
{\bfseries C\+M\+N\+\_\+\+C\+U\+R\+R\+E\+NT}, 
{\bfseries C\+M\+N\+\_\+\+P\+R\+I\+OR}
 \}\begin{DoxyCompactList}\small\item\em Types of cepstral mean normalization to apply to the features. \end{DoxyCompactList}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{cmn_8h_acf5e65a03a0d74630add4a400fed0ce8}} 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+RT \textbf{ cmn\+\_\+type\+\_\+t} \textbf{ cmn\+\_\+type\+\_\+from\+\_\+str} (const char $\ast$str)
\begin{DoxyCompactList}\small\item\em Convert string representation (from command-\/line) to cmn\+\_\+type\+\_\+t. \end{DoxyCompactList}\item 
\mbox{\label{cmn_8h_a7ba6ce5489afce232b9bb61bd2ebd20f}} 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+RT \textbf{ cmn\+\_\+t} $\ast$ {\bfseries cmn\+\_\+init} (int32 veclen)
\item 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+RT void \textbf{ cmn} (\textbf{ cmn\+\_\+t} $\ast$cmn, mfcc\+\_\+t $\ast$$\ast$mfc, int32 varnorm, int32 n\+\_\+frame)
\begin{DoxyCompactList}\small\item\em C\+MN for the whole sentence. \end{DoxyCompactList}\item 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+RT void \textbf{ cmn\+\_\+prior} (\textbf{ cmn\+\_\+t} $\ast$\textbf{ cmn}, mfcc\+\_\+t $\ast$$\ast$incep, int32 varnorm, int32 nfr)
\begin{DoxyCompactList}\small\item\em C\+MN for one block of data, using prior mean. \end{DoxyCompactList}\item 
\mbox{\label{cmn_8h_aae61df2ec71082520669fc63d94bb1ef}} 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+RT void \textbf{ cmn\+\_\+prior\+\_\+update} (\textbf{ cmn\+\_\+t} $\ast$\textbf{ cmn})
\begin{DoxyCompactList}\small\item\em Update prior mean based on observed data. \end{DoxyCompactList}\item 
\mbox{\label{cmn_8h_a0f6f70d51143d6a33130650b8d4758ab}} 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+RT void \textbf{ cmn\+\_\+prior\+\_\+set} (\textbf{ cmn\+\_\+t} $\ast$\textbf{ cmn}, mfcc\+\_\+t const $\ast$vec)
\begin{DoxyCompactList}\small\item\em Set the prior mean. \end{DoxyCompactList}\item 
\mbox{\label{cmn_8h_a4f624f5b805288f66fa05b79b1e4f383}} 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+RT void \textbf{ cmn\+\_\+prior\+\_\+get} (\textbf{ cmn\+\_\+t} $\ast$\textbf{ cmn}, mfcc\+\_\+t $\ast$vec)
\begin{DoxyCompactList}\small\item\em Get the prior mean. \end{DoxyCompactList}\item 
\mbox{\label{cmn_8h_a0f70f378107e3d4e861e39d4f76d8d50}} 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+RT void {\bfseries cmn\+\_\+free} (\textbf{ cmn\+\_\+t} $\ast$\textbf{ cmn})
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+RT const char $\ast$ \textbf{ cmn\+\_\+type\+\_\+str} [$\,$]
\begin{DoxyCompactList}\small\item\em String representations of cmn\+\_\+type\+\_\+t values. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Apply Cepstral Mean Normalization (C\+MN) to the set of input mfc frames. 

By subtractingthe mean of the input from each frame. C0 is also included in this process. This function operates on an entire utterance at a time. Hence, the entire utterance must be available beforehand (batchmode). 

\subsection{Function Documentation}
\mbox{\label{cmn_8h_accf10de8ef4d98b4bf591529cf16565e}} 
\index{cmn.\+h@{cmn.\+h}!cmn@{cmn}}
\index{cmn@{cmn}!cmn.\+h@{cmn.\+h}}
\subsubsection{cmn()}
{\footnotesize\ttfamily S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+RT void cmn (\begin{DoxyParamCaption}\item[{\textbf{ cmn\+\_\+t} $\ast$}]{cmn,  }\item[{mfcc\+\_\+t $\ast$$\ast$}]{mfc,  }\item[{int32}]{varnorm,  }\item[{int32}]{n\+\_\+frame }\end{DoxyParamCaption})}



C\+MN for the whole sentence. 


\begin{DoxyParams}{Parameters}
{\em cmn} & In/\+Out\+: cmn normalization, which contains the cmn\+\_\+mean and cmn\+\_\+var) \\
\hline
{\em mfc} & In/\+Out\+: mfc[f] = mfc vector in frame f \\
\hline
{\em varnorm} & In\+: if not F\+A\+L\+SE, variance normalize the input vectors to have unit variance (along each dimension independently); Irrelevant if no cmn is performed \\
\hline
{\em n\+\_\+frame} & In\+: Number of frames of mfc vectors \\
\hline
\end{DoxyParams}


Definition at line 150 of file cmn.\+c.

\mbox{\label{cmn_8h_aa622cf1b6a1b9a9bffd8f60b903bfc42}} 
\index{cmn.\+h@{cmn.\+h}!cmn\+\_\+prior@{cmn\+\_\+prior}}
\index{cmn\+\_\+prior@{cmn\+\_\+prior}!cmn.\+h@{cmn.\+h}}
\subsubsection{cmn\+\_\+prior()}
{\footnotesize\ttfamily S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+RT void cmn\+\_\+prior (\begin{DoxyParamCaption}\item[{\textbf{ cmn\+\_\+t} $\ast$}]{cmn,  }\item[{mfcc\+\_\+t $\ast$$\ast$}]{incep,  }\item[{int32}]{varnorm,  }\item[{int32}]{nfr }\end{DoxyParamCaption})}



C\+MN for one block of data, using prior mean. 


\begin{DoxyParams}{Parameters}
{\em cmn} & In/\+Out\+: cmn normalization, which contains the cmn\+\_\+mean and cmn\+\_\+var) \\
\hline
{\em incep} & In/\+Out\+: mfc[f] = mfc vector in frame f \\
\hline
{\em varnorm} & This flag should always be 0 for live \\
\hline
{\em nfr} & Number of incoming frames \\
\hline
\end{DoxyParams}


Definition at line 146 of file cmn\+\_\+prior.\+c.



References cmn\+\_\+t\+::cmn\+\_\+mean, E\+\_\+\+F\+A\+T\+AL, cmn\+\_\+t\+::nframe, cmn\+\_\+t\+::sum, and cmn\+\_\+t\+::veclen.



\subsection{Variable Documentation}
\mbox{\label{cmn_8h_ae2ab0bad7168386076c43fc2a421867f}} 
\index{cmn.\+h@{cmn.\+h}!cmn\+\_\+type\+\_\+str@{cmn\+\_\+type\+\_\+str}}
\index{cmn\+\_\+type\+\_\+str@{cmn\+\_\+type\+\_\+str}!cmn.\+h@{cmn.\+h}}
\subsubsection{cmn\+\_\+type\+\_\+str}
{\footnotesize\ttfamily S\+P\+H\+I\+N\+X\+B\+A\+S\+E\+\_\+\+E\+X\+P\+O\+RT const char$\ast$ cmn\+\_\+type\+\_\+str[$\,$]}



String representations of cmn\+\_\+type\+\_\+t values. 



Definition at line 110 of file cmn.\+c.



Referenced by cmn\+\_\+type\+\_\+from\+\_\+str(), and feat\+\_\+init().

