\doxysection{cont\+\_\+ad\+\_\+t Struct Reference}
\label{structcont__ad__t}\index{cont\_ad\_t@{cont\_ad\_t}}


Continuous listening module or object Continuous listening module or object.  




{\ttfamily \#include $<$cont\+\_\+ad.\+h$>$}

\doxysubsubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
int32($\ast$ \textbf{ adfunc} )(\textbf{ ad\+\_\+rec\+\_\+t} $\ast$\textbf{ ad}, int16 $\ast$buf, int32 max)
\item 
\textbf{ ad\+\_\+rec\+\_\+t} $\ast$ \textbf{ ad}
\begin{DoxyCompactList}\small\item\em A/D device argument for adfunc. \end{DoxyCompactList}\item 
int32 \textbf{ rawmode}
\begin{DoxyCompactList}\small\item\em Pass all input data through, without filtering silence. \end{DoxyCompactList}\item 
int16 $\ast$ \textbf{ adbuf}
\begin{DoxyCompactList}\small\item\em Circular buffer for maintaining A/D data read until consumed. \end{DoxyCompactList}\item 
int32 \textbf{ state}
\begin{DoxyCompactList}\small\item\em State of data returned by most recent cont\+\_\+ad\+\_\+read call; CONT\+\_\+\+AD\+\_\+\+STATE\+\_\+\+SIL or CONT\+\_\+\+AD\+\_\+\+STATE\+\_\+\+SPEECH. \end{DoxyCompactList}\item 
int32 \textbf{ read\+\_\+ts}
\begin{DoxyCompactList}\small\item\em Absolute timestamp (total no. \end{DoxyCompactList}\item 
int32 \textbf{ seglen}
\begin{DoxyCompactList}\small\item\em Total no. \end{DoxyCompactList}\item 
int32 \textbf{ siglvl}
\begin{DoxyCompactList}\small\item\em Max signal level for the data consumed by the most recent cont\+\_\+ad\+\_\+read call (dB range\+: 0-\/99). \end{DoxyCompactList}\item 
int32 \textbf{ sps}
\begin{DoxyCompactList}\small\item\em Samples/sec; moved from ad-\/$>$sps to break dependence on ad by N. \end{DoxyCompactList}\item 
int32 \textbf{ eof}
\begin{DoxyCompactList}\small\item\em Whether the source ad device has encountered EOF. \end{DoxyCompactList}\item 
int32 \textbf{ spf}
\begin{DoxyCompactList}\small\item\em Samples/frame; audio level is analyzed within frames. \end{DoxyCompactList}\item 
int32 \textbf{ adbufsize}
\begin{DoxyCompactList}\small\item\em Buffer size (Number of samples) \end{DoxyCompactList}\item 
int32 \textbf{ prev\+\_\+sample}
\begin{DoxyCompactList}\small\item\em For pre-\/emphasis filter. \end{DoxyCompactList}\item 
int32 \textbf{ headfrm}
\begin{DoxyCompactList}\small\item\em Frame number in adbuf with unconsumed A/D data. \end{DoxyCompactList}\item 
int32 \textbf{ n\+\_\+frm}
\begin{DoxyCompactList}\small\item\em Number of complete frames of unconsumed A/D data in adbuf. \end{DoxyCompactList}\item 
int32 \textbf{ n\+\_\+sample}
\begin{DoxyCompactList}\small\item\em Number of samples of unconsumed data in adbuf. \end{DoxyCompactList}\item 
int32 \textbf{ tot\+\_\+frm}
\begin{DoxyCompactList}\small\item\em Total number of frames of A/D data read, including consumed ones. \end{DoxyCompactList}\item 
int32 \textbf{ noise\+\_\+level}
\begin{DoxyCompactList}\small\item\em PWP\+: what we claim as the "{}current"{} noise level. \end{DoxyCompactList}\item 
int32 $\ast$ \textbf{ pow\+\_\+hist}
\begin{DoxyCompactList}\small\item\em Histogram of frame power, moving window, decayed. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ frm\+\_\+pow}
\begin{DoxyCompactList}\small\item\em Frame power. \end{DoxyCompactList}\item 
int32 \textbf{ auto\+\_\+thresh}
\begin{DoxyCompactList}\small\item\em Do automatic threshold adjustment or not. \end{DoxyCompactList}\item 
int32 \textbf{ delta\+\_\+sil}
\begin{DoxyCompactList}\small\item\em Max silence power/frame ABOVE noise level. \end{DoxyCompactList}\item 
int32 \textbf{ delta\+\_\+speech}
\begin{DoxyCompactList}\small\item\em Min speech power/frame ABOVE noise level. \end{DoxyCompactList}\item 
int32 \textbf{ min\+\_\+noise}
\begin{DoxyCompactList}\small\item\em noise lower than this we ignore \end{DoxyCompactList}\item 
int32 \textbf{ max\+\_\+noise}
\begin{DoxyCompactList}\small\item\em noise higher than this signals an error \end{DoxyCompactList}\item 
int32 \textbf{ winsize}
\begin{DoxyCompactList}\small\item\em how many frames to look at for speech det \end{DoxyCompactList}\item 
int32 \textbf{ speech\+\_\+onset}
\begin{DoxyCompactList}\small\item\em start speech on $>$= these many frames out of winsize, of $>$= delta\+\_\+speech \end{DoxyCompactList}\item 
int32 \textbf{ sil\+\_\+onset}
\begin{DoxyCompactList}\small\item\em end speech on $>$= these many frames out of winsize, of $<$= delta\+\_\+sil \end{DoxyCompactList}\item 
int32 \textbf{ leader}
\begin{DoxyCompactList}\small\item\em pad beggining of speech with this many extra frms \end{DoxyCompactList}\item 
int32 \textbf{ trailer}
\begin{DoxyCompactList}\small\item\em pad end of speech with this many extra frms \end{DoxyCompactList}\item 
int32 \textbf{ thresh\+\_\+speech}
\begin{DoxyCompactList}\small\item\em Frame considered to be speech if power $>$= thresh\+\_\+speech (for transitioning from SILENCE to SPEECH state) \end{DoxyCompactList}\item 
int32 \textbf{ thresh\+\_\+sil}
\begin{DoxyCompactList}\small\item\em Frame considered to be silence if power $<$= thresh\+\_\+sil (for transitioning from SPEECH to SILENCE state) \end{DoxyCompactList}\item 
int32 \textbf{ thresh\+\_\+update}
\begin{DoxyCompactList}\small\item\em Number of frames before next update to pow\+\_\+hist/thresholds. \end{DoxyCompactList}\item 
float32 \textbf{ adapt\+\_\+rate}
\begin{DoxyCompactList}\small\item\em Linear interpolation constant for rate at which noise level adapted to each estimate; range\+: 0-\/1; 0=$>$ no adaptation, 1=$>$ instant adaptation. \end{DoxyCompactList}\item 
int32 \textbf{ tail\+\_\+state}
\begin{DoxyCompactList}\small\item\em State at the end of its internal buffer (internal use)\+: CONT\+\_\+\+AD\+\_\+\+STATE\+\_\+\+SIL or CONT\+\_\+\+AD\+\_\+\+STATE\+\_\+\+SPEECH. \end{DoxyCompactList}\item 
int32 \textbf{ win\+\_\+startfrm}
\begin{DoxyCompactList}\small\item\em Where next analysis window begins. \end{DoxyCompactList}\item 
int32 \textbf{ win\+\_\+validfrm}
\begin{DoxyCompactList}\small\item\em Number of frames currently available from win\+\_\+startfrm for analysis. \end{DoxyCompactList}\item 
int32 \textbf{ n\+\_\+other}
\begin{DoxyCompactList}\small\item\em If in SILENCE state, number of frames in analysis window considered to be speech; otherwise number of frames considered to be silence. \end{DoxyCompactList}\item 
\textbf{ spseg\+\_\+t} $\ast$ \textbf{ spseg\+\_\+head}
\begin{DoxyCompactList}\small\item\em First of unconsumed speech segments. \end{DoxyCompactList}\item 
\textbf{ spseg\+\_\+t} $\ast$ \textbf{ spseg\+\_\+tail}
\begin{DoxyCompactList}\small\item\em Last of unconsumed speech segments. \end{DoxyCompactList}\item 
FILE $\ast$ \textbf{ rawfp}
\begin{DoxyCompactList}\small\item\em If non-\/\+NULL, raw audio input data processed by cont\+\_\+ad is dumped to this file. \end{DoxyCompactList}\item 
FILE $\ast$ \textbf{ logfp}
\begin{DoxyCompactList}\small\item\em If non-\/\+NULL, write detailed logs of this object\textquotesingle{}s progress to the file. \end{DoxyCompactList}\item 
int32 \textbf{ n\+\_\+calib\+\_\+frame}
\begin{DoxyCompactList}\small\item\em Number of frames of calibration data seen so far. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Continuous listening module or object Continuous listening module or object. 

An application can open and maintain several such objects, if necessary. FYI\+: Module always in one of two states\+: SILENCE or SPEECH. Transitions between the two detected by sliding a window spanning several frames and looking for some minimum number of frames of the other type. 

Definition at line \textbf{ 151} of file \textbf{ cont\+\_\+ad.\+h}.



\doxysubsection{Field Documentation}
\label{structcont__ad__t_aae5b9d977e62424b0cf0e245485b20a0} 
\index{cont\_ad\_t@{cont\_ad\_t}!ad@{ad}}
\index{ad@{ad}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{ad}
{\footnotesize\ttfamily \textbf{ ad\+\_\+rec\+\_\+t}$\ast$ cont\+\_\+ad\+\_\+t\+::ad}



A/D device argument for adfunc. 

Also, ad-\/$>$sps used to determine frame size (spf, see below) 

Definition at line \textbf{ 154} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+calib()}.

\label{structcont__ad__t_ac22395096037175bf9a0a1f6877e5ec5} 
\index{cont\_ad\_t@{cont\_ad\_t}!adapt\_rate@{adapt\_rate}}
\index{adapt\_rate@{adapt\_rate}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{adapt\_rate}
{\footnotesize\ttfamily float32 cont\+\_\+ad\+\_\+t\+::adapt\+\_\+rate}



Linear interpolation constant for rate at which noise level adapted to each estimate; range\+: 0-\/1; 0=$>$ no adaptation, 1=$>$ instant adaptation. 



Definition at line \textbf{ 213} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+get\+\_\+params()}, and \textbf{ cont\+\_\+ad\+\_\+set\+\_\+params()}.

\label{structcont__ad__t_a719f5c6816cd0da0a31930a2e572b933} 
\index{cont\_ad\_t@{cont\_ad\_t}!adbuf@{adbuf}}
\index{adbuf@{adbuf}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{adbuf}
{\footnotesize\ttfamily int16$\ast$ cont\+\_\+ad\+\_\+t\+::adbuf}



Circular buffer for maintaining A/D data read until consumed. 



Definition at line \textbf{ 158} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+calib()}.

\label{structcont__ad__t_a5c6edc6be287f3ae013c59fef90cb4bd} 
\index{cont\_ad\_t@{cont\_ad\_t}!adbufsize@{adbufsize}}
\index{adbufsize@{adbufsize}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{adbufsize}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::adbufsize}



Buffer size (Number of samples) 



Definition at line \textbf{ 186} of file \textbf{ cont\+\_\+ad.\+h}.

\label{structcont__ad__t_a1ea446b1fcd417bca75fd4ff5442a256} 
\index{cont\_ad\_t@{cont\_ad\_t}!adfunc@{adfunc}}
\index{adfunc@{adfunc}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{adfunc}
{\footnotesize\ttfamily int32($\ast$ cont\+\_\+ad\+\_\+t\+::adfunc) (\textbf{ ad\+\_\+rec\+\_\+t} $\ast$\textbf{ ad}, int16 $\ast$buf, int32 max)}



Definition at line \textbf{ 153} of file \textbf{ cont\+\_\+ad.\+h}.

\label{structcont__ad__t_a9e23379bf649ee06ece20133316253e5} 
\index{cont\_ad\_t@{cont\_ad\_t}!auto\_thresh@{auto\_thresh}}
\index{auto\_thresh@{auto\_thresh}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{auto\_thresh}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::auto\+\_\+thresh}



Do automatic threshold adjustment or not. 



Definition at line \textbf{ 197} of file \textbf{ cont\+\_\+ad.\+h}.

\label{structcont__ad__t_a74a6f56fb4cbde7fc789c9b463cf2f8f} 
\index{cont\_ad\_t@{cont\_ad\_t}!delta\_sil@{delta\_sil}}
\index{delta\_sil@{delta\_sil}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{delta\_sil}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::delta\+\_\+sil}



Max silence power/frame ABOVE noise level. 



Definition at line \textbf{ 198} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+get\+\_\+params()}, and \textbf{ cont\+\_\+ad\+\_\+set\+\_\+params()}.

\label{structcont__ad__t_afca0f69a21d9f28c9610fcefc0e7cb10} 
\index{cont\_ad\_t@{cont\_ad\_t}!delta\_speech@{delta\_speech}}
\index{delta\_speech@{delta\_speech}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{delta\_speech}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::delta\+\_\+speech}



Min speech power/frame ABOVE noise level. 



Definition at line \textbf{ 199} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+get\+\_\+params()}, and \textbf{ cont\+\_\+ad\+\_\+set\+\_\+params()}.

\label{structcont__ad__t_af7b9044b76ed3b86ce74e4e7215ca4c3} 
\index{cont\_ad\_t@{cont\_ad\_t}!eof@{eof}}
\index{eof@{eof}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{eof}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::eof}



Whether the source ad device has encountered EOF. 



Definition at line \textbf{ 183} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}.

\label{structcont__ad__t_a18f146239c77ff4ca6157261acdf4083} 
\index{cont\_ad\_t@{cont\_ad\_t}!frm\_pow@{frm\_pow}}
\index{frm\_pow@{frm\_pow}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{frm\_pow}
{\footnotesize\ttfamily char$\ast$ cont\+\_\+ad\+\_\+t\+::frm\+\_\+pow}



Frame power. 



Definition at line \textbf{ 195} of file \textbf{ cont\+\_\+ad.\+h}.

\label{structcont__ad__t_aa0617a92c549ac916258a54ec2cdc756} 
\index{cont\_ad\_t@{cont\_ad\_t}!headfrm@{headfrm}}
\index{headfrm@{headfrm}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{headfrm}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::headfrm}



Frame number in adbuf with unconsumed A/D data. 



Definition at line \textbf{ 188} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+calib()}, \textbf{ cont\+\_\+ad\+\_\+read()}, and \textbf{ cont\+\_\+ad\+\_\+reset()}.

\label{structcont__ad__t_a0d42e3ac6c1e5c59c86a40f4cf26a861} 
\index{cont\_ad\_t@{cont\_ad\_t}!leader@{leader}}
\index{leader@{leader}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{leader}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::leader}



pad beggining of speech with this many extra frms 



Definition at line \textbf{ 205} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+get\+\_\+params()}, \textbf{ cont\+\_\+ad\+\_\+read()}, and \textbf{ cont\+\_\+ad\+\_\+set\+\_\+params()}.

\label{structcont__ad__t_adbbb6765386309476549beb058a235c5} 
\index{cont\_ad\_t@{cont\_ad\_t}!logfp@{logfp}}
\index{logfp@{logfp}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{logfp}
{\footnotesize\ttfamily FILE$\ast$ cont\+\_\+ad\+\_\+t\+::logfp}



If non-\/\+NULL, write detailed logs of this object\textquotesingle{}s progress to the file. 

Controlled by user application via \doxyref{cont\+\_\+ad\+\_\+set\+\_\+logfp()}{p.}{cont__ad_8h_a16c5810eb19ed89522ef4c3394bbfe83}. NULL when cont\+\_\+ad object is initially created. 

Definition at line \textbf{ 231} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}, and \textbf{ cont\+\_\+ad\+\_\+set\+\_\+logfp()}.

\label{structcont__ad__t_af3b50663565964bb18ebb9f9e0002421} 
\index{cont\_ad\_t@{cont\_ad\_t}!max\_noise@{max\_noise}}
\index{max\_noise@{max\_noise}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{max\_noise}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::max\+\_\+noise}



noise higher than this signals an error 



Definition at line \textbf{ 201} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+get\+\_\+params()}, and \textbf{ cont\+\_\+ad\+\_\+set\+\_\+params()}.

\label{structcont__ad__t_ac301114b24356aef2edccba155e3cf33} 
\index{cont\_ad\_t@{cont\_ad\_t}!min\_noise@{min\_noise}}
\index{min\_noise@{min\_noise}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{min\_noise}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::min\+\_\+noise}



noise lower than this we ignore 



Definition at line \textbf{ 200} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+get\+\_\+params()}, and \textbf{ cont\+\_\+ad\+\_\+set\+\_\+params()}.

\label{structcont__ad__t_ac6e6809727ddc78a13674478d5b527db} 
\index{cont\_ad\_t@{cont\_ad\_t}!n\_calib\_frame@{n\_calib\_frame}}
\index{n\_calib\_frame@{n\_calib\_frame}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{n\_calib\_frame}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::n\+\_\+calib\+\_\+frame}



Number of frames of calibration data seen so far. 



Definition at line \textbf{ 236} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+calib()}.

\label{structcont__ad__t_abed5c6e9a2e078b70fc4c30b667612b2} 
\index{cont\_ad\_t@{cont\_ad\_t}!n\_frm@{n\_frm}}
\index{n\_frm@{n\_frm}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{n\_frm}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::n\+\_\+frm}



Number of complete frames of unconsumed A/D data in adbuf. 



Definition at line \textbf{ 189} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+calib()}, \textbf{ cont\+\_\+ad\+\_\+read()}, and \textbf{ cont\+\_\+ad\+\_\+reset()}.

\label{structcont__ad__t_a628e5b444bde5e0eb0dc7fe8731a31a6} 
\index{cont\_ad\_t@{cont\_ad\_t}!n\_other@{n\_other}}
\index{n\_other@{n\_other}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{n\_other}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::n\+\_\+other}



If in SILENCE state, number of frames in analysis window considered to be speech; otherwise number of frames considered to be silence. 



Definition at line \textbf{ 222} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}, and \textbf{ cont\+\_\+ad\+\_\+reset()}.

\label{structcont__ad__t_a7ae5362560d9edfa6c16555285487a7a} 
\index{cont\_ad\_t@{cont\_ad\_t}!n\_sample@{n\_sample}}
\index{n\_sample@{n\_sample}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{n\_sample}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::n\+\_\+sample}



Number of samples of unconsumed data in adbuf. 



Definition at line \textbf{ 190} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}, and \textbf{ cont\+\_\+ad\+\_\+reset()}.

\label{structcont__ad__t_af60b0f78f9959a25cf7e7bf4c4aab4d7} 
\index{cont\_ad\_t@{cont\_ad\_t}!noise\_level@{noise\_level}}
\index{noise\_level@{noise\_level}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{noise\_level}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::noise\+\_\+level}



PWP\+: what we claim as the "{}current"{} noise level. 



Definition at line \textbf{ 192} of file \textbf{ cont\+\_\+ad.\+h}.

\label{structcont__ad__t_a01f61a105019bea12533db84351d07b9} 
\index{cont\_ad\_t@{cont\_ad\_t}!pow\_hist@{pow\_hist}}
\index{pow\_hist@{pow\_hist}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{pow\_hist}
{\footnotesize\ttfamily int32$\ast$ cont\+\_\+ad\+\_\+t\+::pow\+\_\+hist}



Histogram of frame power, moving window, decayed. 



Definition at line \textbf{ 194} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+calib()}, and \textbf{ cont\+\_\+ad\+\_\+powhist\+\_\+dump()}.

\label{structcont__ad__t_a54e2013d9634ec473aaf79a606fb2e0f} 
\index{cont\_ad\_t@{cont\_ad\_t}!prev\_sample@{prev\_sample}}
\index{prev\_sample@{prev\_sample}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{prev\_sample}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::prev\+\_\+sample}



For pre-\/emphasis filter. 



Definition at line \textbf{ 187} of file \textbf{ cont\+\_\+ad.\+h}.

\label{structcont__ad__t_af8cd2a7e0ef0f4e2c825c7812a091f9c} 
\index{cont\_ad\_t@{cont\_ad\_t}!rawfp@{rawfp}}
\index{rawfp@{rawfp}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{rawfp}
{\footnotesize\ttfamily FILE$\ast$ cont\+\_\+ad\+\_\+t\+::rawfp}



If non-\/\+NULL, raw audio input data processed by cont\+\_\+ad is dumped to this file. 

Controlled by user application via \doxyref{cont\+\_\+ad\+\_\+set\+\_\+rawfp()}{p.}{cont__ad_8h_a662ed7c409479060e3b5ac8eb7bd1865}. NULL when cont\+\_\+ad object is initially created. 

Definition at line \textbf{ 227} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+set\+\_\+rawfp()}.

\label{structcont__ad__t_a7726e8ea1bcca281a39c4b27bbb115e3} 
\index{cont\_ad\_t@{cont\_ad\_t}!rawmode@{rawmode}}
\index{rawmode@{rawmode}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{rawmode}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::rawmode}



Pass all input data through, without filtering silence. 



Definition at line \textbf{ 156} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}.

\label{structcont__ad__t_a7b71e87abfcb3ca4ae73af34c86f955e} 
\index{cont\_ad\_t@{cont\_ad\_t}!read\_ts@{read\_ts}}
\index{read\_ts@{read\_ts}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{read\_ts}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::read\+\_\+ts}



Absolute timestamp (total no. 

of raw samples consumed upto the most recent cont\+\_\+ad\+\_\+read call, starting from the very beginning). Note that this is a 32-\/bit integer; applications should guard against overflow. 

Definition at line \textbf{ 167} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}.

\label{structcont__ad__t_a478939247e09a8ae142c8996ec17d8c8} 
\index{cont\_ad\_t@{cont\_ad\_t}!seglen@{seglen}}
\index{seglen@{seglen}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{seglen}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::seglen}



Total no. 

of raw samples consumed in the segment returned by the most recent cont\+\_\+ad\+\_\+read call. Can be used to detect silence segments that have stretched long enough to terminate an utterance 

Definition at line \textbf{ 171} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}.

\label{structcont__ad__t_a5524c052dcd0a3d1a1c3b1fc2134b62e} 
\index{cont\_ad\_t@{cont\_ad\_t}!siglvl@{siglvl}}
\index{siglvl@{siglvl}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{siglvl}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::siglvl}



Max signal level for the data consumed by the most recent cont\+\_\+ad\+\_\+read call (dB range\+: 0-\/99). 

Can be used to update a V-\/U meter, for example. 

Definition at line \textbf{ 175} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}.

\label{structcont__ad__t_a9f5e138f4b79b59bf4daa5603d171165} 
\index{cont\_ad\_t@{cont\_ad\_t}!sil\_onset@{sil\_onset}}
\index{sil\_onset@{sil\_onset}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{sil\_onset}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::sil\+\_\+onset}



end speech on $>$= these many frames out of winsize, of $<$= delta\+\_\+sil 



Definition at line \textbf{ 204} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+get\+\_\+params()}, and \textbf{ cont\+\_\+ad\+\_\+set\+\_\+params()}.

\label{structcont__ad__t_a1b0bb7e53a2bf537ed362badddca341b} 
\index{cont\_ad\_t@{cont\_ad\_t}!speech\_onset@{speech\_onset}}
\index{speech\_onset@{speech\_onset}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{speech\_onset}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::speech\+\_\+onset}



start speech on $>$= these many frames out of winsize, of $>$= delta\+\_\+speech 



Definition at line \textbf{ 203} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+get\+\_\+params()}, and \textbf{ cont\+\_\+ad\+\_\+set\+\_\+params()}.

\label{structcont__ad__t_a55f701abf33b5f68f9ef4cbf95dfaf73} 
\index{cont\_ad\_t@{cont\_ad\_t}!spf@{spf}}
\index{spf@{spf}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{spf}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::spf}



Samples/frame; audio level is analyzed within frames. 



Definition at line \textbf{ 185} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+calib()}, \textbf{ cont\+\_\+ad\+\_\+calib\+\_\+loop()}, \textbf{ cont\+\_\+ad\+\_\+powhist\+\_\+dump()}, and \textbf{ cont\+\_\+ad\+\_\+read()}.

\label{structcont__ad__t_a11a4bb48870007b39f8fa46e4b8f111a} 
\index{cont\_ad\_t@{cont\_ad\_t}!sps@{sps}}
\index{sps@{sps}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{sps}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::sps}



Samples/sec; moved from ad-\/$>$sps to break dependence on ad by N. 

Roy. 

Definition at line \textbf{ 180} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+powhist\+\_\+dump()}.

\label{structcont__ad__t_abffe61140bc2a02ae4222183b3ef6159} 
\index{cont\_ad\_t@{cont\_ad\_t}!spseg\_head@{spseg\_head}}
\index{spseg\_head@{spseg\_head}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{spseg\_head}
{\footnotesize\ttfamily \textbf{ spseg\+\_\+t}$\ast$ cont\+\_\+ad\+\_\+t\+::spseg\+\_\+head}



First of unconsumed speech segments. 



Definition at line \textbf{ 224} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}, and \textbf{ cont\+\_\+ad\+\_\+reset()}.

\label{structcont__ad__t_ac77e8f8bd27cea3b99238d9663455972} 
\index{cont\_ad\_t@{cont\_ad\_t}!spseg\_tail@{spseg\_tail}}
\index{spseg\_tail@{spseg\_tail}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{spseg\_tail}
{\footnotesize\ttfamily \textbf{ spseg\+\_\+t}$\ast$ cont\+\_\+ad\+\_\+t\+::spseg\+\_\+tail}



Last of unconsumed speech segments. 



Definition at line \textbf{ 225} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}, and \textbf{ cont\+\_\+ad\+\_\+reset()}.

\label{structcont__ad__t_a5d9420ea711733d1eea9b8f29a638fdb} 
\index{cont\_ad\_t@{cont\_ad\_t}!state@{state}}
\index{state@{state}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{state}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::state}



State of data returned by most recent cont\+\_\+ad\+\_\+read call; CONT\+\_\+\+AD\+\_\+\+STATE\+\_\+\+SIL or CONT\+\_\+\+AD\+\_\+\+STATE\+\_\+\+SPEECH. 



Definition at line \textbf{ 165} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}.

\label{structcont__ad__t_ae52185e7f7dfe424060c0ff562a8858b} 
\index{cont\_ad\_t@{cont\_ad\_t}!tail\_state@{tail\_state}}
\index{tail\_state@{tail\_state}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{tail\_state}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::tail\+\_\+state}



State at the end of its internal buffer (internal use)\+: CONT\+\_\+\+AD\+\_\+\+STATE\+\_\+\+SIL or CONT\+\_\+\+AD\+\_\+\+STATE\+\_\+\+SPEECH. 

Note\+: This is different from \doxyref{cont\+\_\+ad\+\_\+t.\+state}{p.}{structcont__ad__t_a5d9420ea711733d1eea9b8f29a638fdb}. 

Definition at line \textbf{ 217} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}, and \textbf{ cont\+\_\+ad\+\_\+reset()}.

\label{structcont__ad__t_adbbe28dca87d06a3ca8d2390d08ea83a} 
\index{cont\_ad\_t@{cont\_ad\_t}!thresh\_sil@{thresh\_sil}}
\index{thresh\_sil@{thresh\_sil}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{thresh\_sil}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::thresh\+\_\+sil}



Frame considered to be silence if power $<$= thresh\+\_\+sil (for transitioning from SPEECH to SILENCE state) 



Definition at line \textbf{ 210} of file \textbf{ cont\+\_\+ad.\+h}.

\label{structcont__ad__t_a0b9333d9acc41b5bfb67f69fc22ca901} 
\index{cont\_ad\_t@{cont\_ad\_t}!thresh\_speech@{thresh\_speech}}
\index{thresh\_speech@{thresh\_speech}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{thresh\_speech}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::thresh\+\_\+speech}



Frame considered to be speech if power $>$= thresh\+\_\+speech (for transitioning from SILENCE to SPEECH state) 



Definition at line \textbf{ 208} of file \textbf{ cont\+\_\+ad.\+h}.

\label{structcont__ad__t_a2168183b25add085cf3aa29ddab1c8ce} 
\index{cont\_ad\_t@{cont\_ad\_t}!thresh\_update@{thresh\_update}}
\index{thresh\_update@{thresh\_update}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{thresh\_update}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::thresh\+\_\+update}



Number of frames before next update to pow\+\_\+hist/thresholds. 



Definition at line \textbf{ 212} of file \textbf{ cont\+\_\+ad.\+h}.

\label{structcont__ad__t_a4ed32427e6a785b571b1346c85481899} 
\index{cont\_ad\_t@{cont\_ad\_t}!tot\_frm@{tot\_frm}}
\index{tot\_frm@{tot\_frm}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{tot\_frm}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::tot\+\_\+frm}



Total number of frames of A/D data read, including consumed ones. 



Definition at line \textbf{ 191} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+powhist\+\_\+dump()}, and \textbf{ cont\+\_\+ad\+\_\+read()}.

\label{structcont__ad__t_aa15db1e9fbb0048225521555ab8d9388} 
\index{cont\_ad\_t@{cont\_ad\_t}!trailer@{trailer}}
\index{trailer@{trailer}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{trailer}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::trailer}



pad end of speech with this many extra frms 



Definition at line \textbf{ 206} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+get\+\_\+params()}, and \textbf{ cont\+\_\+ad\+\_\+set\+\_\+params()}.

\label{structcont__ad__t_a75bc7d23bfedfd79a2fd1e3ea2188e4c} 
\index{cont\_ad\_t@{cont\_ad\_t}!win\_startfrm@{win\_startfrm}}
\index{win\_startfrm@{win\_startfrm}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{win\_startfrm}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::win\+\_\+startfrm}



Where next analysis window begins. 



Definition at line \textbf{ 220} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}, and \textbf{ cont\+\_\+ad\+\_\+reset()}.

\label{structcont__ad__t_a14ee16922e7287ad4ce8c51c6ddb74fc} 
\index{cont\_ad\_t@{cont\_ad\_t}!win\_validfrm@{win\_validfrm}}
\index{win\_validfrm@{win\_validfrm}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{win\_validfrm}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::win\+\_\+validfrm}



Number of frames currently available from win\+\_\+startfrm for analysis. 



Definition at line \textbf{ 221} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+read()}, \textbf{ cont\+\_\+ad\+\_\+reset()}, and \textbf{ cont\+\_\+ad\+\_\+set\+\_\+params()}.

\label{structcont__ad__t_a7c61513f48e8fbc9ab6b57db66dad7b9} 
\index{cont\_ad\_t@{cont\_ad\_t}!winsize@{winsize}}
\index{winsize@{winsize}!cont\_ad\_t@{cont\_ad\_t}}
\doxysubsubsection{winsize}
{\footnotesize\ttfamily int32 cont\+\_\+ad\+\_\+t\+::winsize}



how many frames to look at for speech det 



Definition at line \textbf{ 202} of file \textbf{ cont\+\_\+ad.\+h}.



Referenced by \textbf{ cont\+\_\+ad\+\_\+get\+\_\+params()}, \textbf{ cont\+\_\+ad\+\_\+read()}, and \textbf{ cont\+\_\+ad\+\_\+set\+\_\+params()}.



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
include/sphinxbase/\textbf{ cont\+\_\+ad.\+h}\end{DoxyCompactItemize}
