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


Apply Cepstral Mean Normalization (C\-M\-N) to the set of input mfc frames.  


{\ttfamily \#include $<$sphinxbase/sphinxbase\-\_\-export.\-h$>$}\\*
{\ttfamily \#include $<$sphinxbase/prim\-\_\-type.\-h$>$}\\*
{\ttfamily \#include $<$sphinxbase/fe.\-h$>$}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct {\bf cmn\-\_\-t}
\begin{DoxyCompactList}\small\item\em wrapper of operation of the cepstral mean normalization. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define {\bfseries C\-M\-N\-\_\-\-W\-I\-N\-\_\-\-H\-W\-M}~800     /$\ast$ \#frames after which window shifted $\ast$/\label{cmn_8h_abbf37b74032c295136b4b299ecfcedae}

\item 
\#define {\bfseries C\-M\-N\-\_\-\-W\-I\-N}~500\label{cmn_8h_a500dafed8351d334da9290ec4f3f6ab3}

\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef enum {\bf cmn\-\_\-type\-\_\-e} {\bf cmn\-\_\-type\-\_\-t}\label{cmn_8h_a9384c411b10e9db9745cfb550a5c7652}

\begin{DoxyCompactList}\small\item\em Types of cepstral mean normalization to apply to the features. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum {\bf cmn\-\_\-type\-\_\-e} \{ {\bfseries C\-M\-N\-\_\-\-N\-O\-N\-E} = 0, 
{\bfseries C\-M\-N\-\_\-\-B\-A\-T\-C\-H}, 
{\bfseries C\-M\-N\-\_\-\-L\-I\-V\-E}
 \}
\begin{DoxyCompactList}\small\item\em Types of cepstral mean normalization to apply to the features. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
S\-P\-H\-I\-N\-X\-B\-A\-S\-E\-\_\-\-E\-X\-P\-O\-R\-T {\bf cmn\-\_\-type\-\_\-t} {\bf cmn\-\_\-type\-\_\-from\-\_\-str} (const char $\ast$str)\label{cmn_8h_acf5e65a03a0d74630add4a400fed0ce8}

\begin{DoxyCompactList}\small\item\em Convert string representation (from command-\/line) to cmn\-\_\-type\-\_\-t. \end{DoxyCompactList}\item 
S\-P\-H\-I\-N\-X\-B\-A\-S\-E\-\_\-\-E\-X\-P\-O\-R\-T {\bf cmn\-\_\-t} $\ast$ {\bfseries cmn\-\_\-init} (int32 veclen)\label{cmn_8h_a7ba6ce5489afce232b9bb61bd2ebd20f}

\item 
S\-P\-H\-I\-N\-X\-B\-A\-S\-E\-\_\-\-E\-X\-P\-O\-R\-T void {\bf cmn} ({\bf cmn\-\_\-t} $\ast$cmn, mfcc\-\_\-t $\ast$$\ast$mfc, int32 varnorm, int32 n\-\_\-frame)
\begin{DoxyCompactList}\small\item\em C\-M\-N for the whole sentence. \end{DoxyCompactList}\item 
S\-P\-H\-I\-N\-X\-B\-A\-S\-E\-\_\-\-E\-X\-P\-O\-R\-T void {\bf cmn\-\_\-live} ({\bf cmn\-\_\-t} $\ast${\bf cmn}, mfcc\-\_\-t $\ast$$\ast$incep, int32 varnorm, int32 nfr)
\begin{DoxyCompactList}\small\item\em C\-M\-N for one block of data, using live mean. \end{DoxyCompactList}\item 
S\-P\-H\-I\-N\-X\-B\-A\-S\-E\-\_\-\-E\-X\-P\-O\-R\-T void {\bf cmn\-\_\-live\-\_\-update} ({\bf cmn\-\_\-t} $\ast${\bf cmn})\label{cmn_8h_ad63cc93b21560d4d33f866768775efd5}

\begin{DoxyCompactList}\small\item\em Update live mean based on observed data. \end{DoxyCompactList}\item 
S\-P\-H\-I\-N\-X\-B\-A\-S\-E\-\_\-\-E\-X\-P\-O\-R\-T void {\bf cmn\-\_\-live\-\_\-set} ({\bf cmn\-\_\-t} $\ast${\bf cmn}, mfcc\-\_\-t const $\ast$vec)\label{cmn_8h_ae2d0e4bdd885b433c93d5dacca09bb86}

\begin{DoxyCompactList}\small\item\em Set the live mean. \end{DoxyCompactList}\item 
S\-P\-H\-I\-N\-X\-B\-A\-S\-E\-\_\-\-E\-X\-P\-O\-R\-T void {\bf cmn\-\_\-live\-\_\-get} ({\bf cmn\-\_\-t} $\ast${\bf cmn}, mfcc\-\_\-t $\ast$vec)\label{cmn_8h_a3621707e373ae24bcd47b6aa691cbb3a}

\begin{DoxyCompactList}\small\item\em Get the live mean. \end{DoxyCompactList}\item 
S\-P\-H\-I\-N\-X\-B\-A\-S\-E\-\_\-\-E\-X\-P\-O\-R\-T void {\bfseries cmn\-\_\-free} ({\bf cmn\-\_\-t} $\ast${\bf cmn})\label{cmn_8h_a0f70f378107e3d4e861e39d4f76d8d50}

\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
S\-P\-H\-I\-N\-X\-B\-A\-S\-E\-\_\-\-E\-X\-P\-O\-R\-T const char $\ast$ {\bf 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\-M\-N) 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). 

Definition in file {\bf cmn.\-h}.



\subsection{Function Documentation}
\index{cmn.\-h@{cmn.\-h}!cmn@{cmn}}
\index{cmn@{cmn}!cmn.h@{cmn.\-h}}
\subsubsection[{cmn}]{\setlength{\rightskip}{0pt plus 5cm}S\-P\-H\-I\-N\-X\-B\-A\-S\-E\-\_\-\-E\-X\-P\-O\-R\-T void cmn (
\begin{DoxyParamCaption}
\item[{{\bf cmn\-\_\-t} $\ast$}]{cmn, }
\item[{mfcc\-\_\-t $\ast$$\ast$}]{mfc, }
\item[{int32}]{varnorm, }
\item[{int32}]{n\-\_\-frame}
\end{DoxyParamCaption}
)}\label{cmn_8h_accf10de8ef4d98b4bf591529cf16565e}


C\-M\-N 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\-S\-E, 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 100 of file cmn.\-c.



References cmn\-\_\-t\-::cmn\-\_\-mean, cmn\-\_\-t\-::cmn\-\_\-var, E\-\_\-\-I\-N\-F\-O, E\-\_\-\-I\-N\-F\-O\-C\-O\-N\-T, and cmn\-\_\-t\-::veclen.



Referenced by feat\-\_\-init().

\index{cmn.\-h@{cmn.\-h}!cmn\-\_\-live@{cmn\-\_\-live}}
\index{cmn\-\_\-live@{cmn\-\_\-live}!cmn.h@{cmn.\-h}}
\subsubsection[{cmn\-\_\-live}]{\setlength{\rightskip}{0pt plus 5cm}S\-P\-H\-I\-N\-X\-B\-A\-S\-E\-\_\-\-E\-X\-P\-O\-R\-T void cmn\-\_\-live (
\begin{DoxyParamCaption}
\item[{{\bf cmn\-\_\-t} $\ast$}]{cmn, }
\item[{mfcc\-\_\-t $\ast$$\ast$}]{incep, }
\item[{int32}]{varnorm, }
\item[{int32}]{nfr}
\end{DoxyParamCaption}
)}\label{cmn_8h_a47461833933523e47c09abe3fe2355dd}


C\-M\-N for one block of data, using live 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 145 of file cmn\-\_\-live.\-c.



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



\subsection{Variable Documentation}
\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}]{\setlength{\rightskip}{0pt plus 5cm}S\-P\-H\-I\-N\-X\-B\-A\-S\-E\-\_\-\-E\-X\-P\-O\-R\-T const char$\ast$ cmn\-\_\-type\-\_\-str[$\,$]}\label{cmn_8h_ae2ab0bad7168386076c43fc2a421867f}


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



Definition at line 59 of file cmn.\-c.



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

