Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 0b420d0fce195cf4115dc6a3be5c2da2 > files > 119

sphinxbase-devel-0.7-1.fc14.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>SphinxBase: include/sphinxbase/feat.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">SphinxBase&#160;<span id="projectnumber">0.6</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('feat_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<h1>include/sphinxbase/feat.h</h1>  </div>
</div>
<div class="contents">
<a href="feat_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */</span>
<a name="l00002"></a>00002 <span class="comment">/* ====================================================================</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (c) 1999-2004 Carnegie Mellon University.  All rights</span>
<a name="l00004"></a>00004 <span class="comment"> * reserved.</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00007"></a>00007 <span class="comment"> * modification, are permitted provided that the following conditions</span>
<a name="l00008"></a>00008 <span class="comment"> * are met:</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * 1. Redistributions of source code must retain the above copyright</span>
<a name="l00011"></a>00011 <span class="comment"> *    notice, this list of conditions and the following disclaimer. </span>
<a name="l00012"></a>00012 <span class="comment"> *</span>
<a name="l00013"></a>00013 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span>
<a name="l00014"></a>00014 <span class="comment"> *    notice, this list of conditions and the following disclaimer in</span>
<a name="l00015"></a>00015 <span class="comment"> *    the documentation and/or other materials provided with the</span>
<a name="l00016"></a>00016 <span class="comment"> *    distribution.</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * This work was supported in part by funding from the Defense Advanced </span>
<a name="l00019"></a>00019 <span class="comment"> * Research Projects Agency and the National Science Foundation of the </span>
<a name="l00020"></a>00020 <span class="comment"> * United States of America, and the CMU Sphinx Speech Consortium.</span>
<a name="l00021"></a>00021 <span class="comment"> *</span>
<a name="l00022"></a>00022 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS&#39;&#39; AND </span>
<a name="l00023"></a>00023 <span class="comment"> * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, </span>
<a name="l00024"></a>00024 <span class="comment"> * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR</span>
<a name="l00025"></a>00025 <span class="comment"> * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY</span>
<a name="l00026"></a>00026 <span class="comment"> * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</span>
<a name="l00027"></a>00027 <span class="comment"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT </span>
<a name="l00028"></a>00028 <span class="comment"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, </span>
<a name="l00029"></a>00029 <span class="comment"> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY </span>
<a name="l00030"></a>00030 <span class="comment"> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT </span>
<a name="l00031"></a>00031 <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE </span>
<a name="l00032"></a>00032 <span class="comment"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00033"></a>00033 <span class="comment"> *</span>
<a name="l00034"></a>00034 <span class="comment"> * ====================================================================</span>
<a name="l00035"></a>00035 <span class="comment"> *</span>
<a name="l00036"></a>00036 <span class="comment"> */</span>
<a name="l00037"></a>00037 <span class="comment">/*</span>
<a name="l00038"></a>00038 <span class="comment"> * feat.h -- Cepstral features computation.</span>
<a name="l00039"></a>00039 <span class="comment"> *</span>
<a name="l00040"></a>00040 <span class="comment"> * **********************************************</span>
<a name="l00041"></a>00041 <span class="comment"> * CMU ARPA Speech Project</span>
<a name="l00042"></a>00042 <span class="comment"> *</span>
<a name="l00043"></a>00043 <span class="comment"> * Copyright (c) 1999 Carnegie Mellon University.</span>
<a name="l00044"></a>00044 <span class="comment"> * ALL RIGHTS RESERVED.</span>
<a name="l00045"></a>00045 <span class="comment"> * **********************************************</span>
<a name="l00046"></a>00046 <span class="comment"> * </span>
<a name="l00047"></a>00047 <span class="comment"> * HISTORY</span>
<a name="l00048"></a>00048 <span class="comment"> * $Log$</span>
<a name="l00049"></a>00049 <span class="comment"> * Revision 1.1  2006/04/05  20:27:30  dhdfu</span>
<a name="l00050"></a>00050 <span class="comment"> * A Great Reorganzation of header files and executables</span>
<a name="l00051"></a>00051 <span class="comment"> * </span>
<a name="l00052"></a>00052 <span class="comment"> * Revision 1.17  2006/02/23 03:59:40  arthchan2003</span>
<a name="l00053"></a>00053 <span class="comment"> * Merged from branch SPHINX3_5_2_RCI_IRII_BRANCH: a, Free buffers correctly. b, Fixed dox-doc.</span>
<a name="l00054"></a>00054 <span class="comment"> *</span>
<a name="l00055"></a>00055 <span class="comment"> * Revision 1.16.4.1  2005/07/05 06:25:08  arthchan2003</span>
<a name="l00056"></a>00056 <span class="comment"> * Fixed dox-doc.</span>
<a name="l00057"></a>00057 <span class="comment"> *</span>
<a name="l00058"></a>00058 <span class="comment"> * Revision 1.16  2005/06/22 03:29:35  arthchan2003</span>
<a name="l00059"></a>00059 <span class="comment"> * Makefile.am s  for all subdirectory of libs3decoder/</span>
<a name="l00060"></a>00060 <span class="comment"> *</span>
<a name="l00061"></a>00061 <span class="comment"> * Revision 1.5  2005/06/13 04:02:56  archan</span>
<a name="l00062"></a>00062 <span class="comment"> * Fixed most doxygen-style documentation under libs3decoder.</span>
<a name="l00063"></a>00063 <span class="comment"> *</span>
<a name="l00064"></a>00064 <span class="comment"> * Revision 1.4  2005/04/21 23:50:26  archan</span>
<a name="l00065"></a>00065 <span class="comment"> * Some more refactoring on the how reporting of structures inside kbcore_t is done, it is now 50% nice. Also added class-based LM test case into test-decode.sh.in.  At this moment, everything in search mode 5 is already done.  It is time to test the idea whether the search can really be used.</span>
<a name="l00066"></a>00066 <span class="comment"> *</span>
<a name="l00067"></a>00067 <span class="comment"> * Revision 1.3  2005/03/30 01:22:46  archan</span>
<a name="l00068"></a>00068 <span class="comment"> * Fixed mistakes in last updates. Add</span>
<a name="l00069"></a>00069 <span class="comment"> *</span>
<a name="l00070"></a>00070 <span class="comment"> * </span>
<a name="l00071"></a>00071 <span class="comment"> * 20.Apr.2001  RAH (rhoughton@mediasite.com, ricky.houghton@cs.cmu.edu)</span>
<a name="l00072"></a>00072 <span class="comment"> *              Adding feat_free() to free allocated memory</span>
<a name="l00073"></a>00073 <span class="comment"> * </span>
<a name="l00074"></a>00074 <span class="comment"> * 04-Jan-1999  M K Ravishankar (rkm@cs.cmu.edu) at Carnegie Mellon University</span>
<a name="l00075"></a>00075 <span class="comment"> *              Started.</span>
<a name="l00076"></a>00076 <span class="comment"> */</span>
<a name="l00077"></a>00077 
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 <span class="preprocessor">#ifndef _S3_FEAT_H_</span>
<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#define _S3_FEAT_H_</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span>
<a name="l00082"></a>00082 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00083"></a>00083 
<a name="l00084"></a>00084 <span class="comment">/* Win32/WinCE DLL gunk */</span>
<a name="l00085"></a>00085 <span class="preprocessor">#include &lt;sphinxbase/sphinxbase_export.h&gt;</span>
<a name="l00086"></a>00086 <span class="preprocessor">#include &lt;sphinxbase/prim_type.h&gt;</span>
<a name="l00087"></a>00087 <span class="preprocessor">#include &lt;sphinxbase/fe.h&gt;</span>
<a name="l00088"></a>00088 <span class="preprocessor">#include &lt;sphinxbase/cmn.h&gt;</span>
<a name="l00089"></a>00089 <span class="preprocessor">#include &lt;sphinxbase/agc.h&gt;</span>
<a name="l00090"></a>00090 
<a name="l00091"></a>00091 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00092"></a>00092 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00093"></a>00093 <span class="preprocessor">#endif</span>
<a name="l00094"></a>00094 <span class="preprocessor"></span><span class="preprocessor">#if 0</span>
<a name="l00095"></a>00095 <span class="preprocessor"></span><span class="comment">/* Fool Emacs. */</span>
<a name="l00096"></a>00096 }
<a name="l00097"></a>00097 <span class="preprocessor">#endif</span>
<a name="l00098"></a>00098 <span class="preprocessor"></span>
<a name="l00102"></a>00102 <span class="preprocessor">#define LIVEBUFBLOCKSIZE        256    </span>
<a name="l00104"></a>00104 <span class="preprocessor">#define S3_MAX_FRAMES           15000    </span><span class="comment">/* RAH, I believe this is still too large, but better than before */</span>
<a name="l00105"></a>00105 
<a name="l00106"></a>00106 <span class="preprocessor">#define cepstral_to_feature_command_line_macro()                        \</span>
<a name="l00107"></a>00107 <span class="preprocessor">{ &quot;-feat&quot;,                                                              \</span>
<a name="l00108"></a>00108 <span class="preprocessor">      ARG_STRING,                                                       \</span>
<a name="l00109"></a>00109 <span class="preprocessor">      &quot;1s_c_d_dd&quot;,                                                      \</span>
<a name="l00110"></a>00110 <span class="preprocessor">      &quot;Feature stream type, depends on the acoustic model&quot; },           \</span>
<a name="l00111"></a>00111 <span class="preprocessor">{ &quot;-ceplen&quot;,                                                            \</span>
<a name="l00112"></a>00112 <span class="preprocessor">      ARG_INT32,                                                        \</span>
<a name="l00113"></a>00113 <span class="preprocessor">      &quot;13&quot;,                                                             \</span>
<a name="l00114"></a>00114 <span class="preprocessor">     &quot;Number of components in the input feature vector&quot; },              \</span>
<a name="l00115"></a>00115 <span class="preprocessor">{ &quot;-cmn&quot;,                                                               \</span>
<a name="l00116"></a>00116 <span class="preprocessor">      ARG_STRING,                                                       \</span>
<a name="l00117"></a>00117 <span class="preprocessor">      &quot;current&quot;,                                                        \</span>
<a name="l00118"></a>00118 <span class="preprocessor">      &quot;Cepstral mean normalization scheme (&#39;current&#39;, &#39;prior&#39;, or &#39;none&#39;)&quot; }, \</span>
<a name="l00119"></a>00119 <span class="preprocessor">{ &quot;-cmninit&quot;,                                                           \</span>
<a name="l00120"></a>00120 <span class="preprocessor">      ARG_STRING,                                                       \</span>
<a name="l00121"></a>00121 <span class="preprocessor">      &quot;8.0&quot;,                                                            \</span>
<a name="l00122"></a>00122 <span class="preprocessor">      &quot;Initial values (comma-separated) for cepstral mean when &#39;prior&#39; is used&quot; }, \</span>
<a name="l00123"></a>00123 <span class="preprocessor">{ &quot;-varnorm&quot;,                                                           \</span>
<a name="l00124"></a>00124 <span class="preprocessor">      ARG_BOOLEAN,                                                      \</span>
<a name="l00125"></a>00125 <span class="preprocessor">      &quot;no&quot;,                                                             \</span>
<a name="l00126"></a>00126 <span class="preprocessor">      &quot;Variance normalize each utterance (only if CMN == current)&quot; },   \</span>
<a name="l00127"></a>00127 <span class="preprocessor">{ &quot;-agc&quot;,                                                               \</span>
<a name="l00128"></a>00128 <span class="preprocessor">      ARG_STRING,                                                       \</span>
<a name="l00129"></a>00129 <span class="preprocessor">      &quot;none&quot;,                                                           \</span>
<a name="l00130"></a>00130 <span class="preprocessor">      &quot;Automatic gain control for c0 (&#39;max&#39;, &#39;emax&#39;, &#39;noise&#39;, or &#39;none&#39;)&quot; }, \</span>
<a name="l00131"></a>00131 <span class="preprocessor">{ &quot;-agcthresh&quot;,                                                         \</span>
<a name="l00132"></a>00132 <span class="preprocessor">      ARG_FLOAT32,                                                      \</span>
<a name="l00133"></a>00133 <span class="preprocessor">      &quot;2.0&quot;,                                                            \</span>
<a name="l00134"></a>00134 <span class="preprocessor">      &quot;Initial threshold for automatic gain control&quot; },                 \</span>
<a name="l00135"></a>00135 <span class="preprocessor">{ &quot;-lda&quot;,                                                               \</span>
<a name="l00136"></a>00136 <span class="preprocessor">      ARG_STRING,                                                       \</span>
<a name="l00137"></a>00137 <span class="preprocessor">      NULL,                                                             \</span>
<a name="l00138"></a>00138 <span class="preprocessor">      &quot;File containing transformation matrix to be applied to features (single-stream features only)&quot; }, \</span>
<a name="l00139"></a>00139 <span class="preprocessor">{ &quot;-ldadim&quot;,                                                            \</span>
<a name="l00140"></a>00140 <span class="preprocessor">      ARG_INT32,                                                        \</span>
<a name="l00141"></a>00141 <span class="preprocessor">      &quot;0&quot;,                                                              \</span>
<a name="l00142"></a>00142 <span class="preprocessor">      &quot;Dimensionality of output of feature transformation (0 to use entire matrix)&quot; }, \</span>
<a name="l00143"></a>00143 <span class="preprocessor">{&quot;-svspec&quot;,                                                             \</span>
<a name="l00144"></a>00144 <span class="preprocessor">     ARG_STRING,                                                        \</span>
<a name="l00145"></a>00145 <span class="preprocessor">     NULL,                                                           \</span>
<a name="l00146"></a>00146 <span class="preprocessor">     &quot;Subvector specification (e.g., 24,0-11/25,12-23/26-38 or 0-12/13-25/26-38)&quot;}</span>
<a name="l00147"></a>00147 <span class="preprocessor"></span>
<a name="l00155"></a><a class="code" href="structfeat__s.html">00155</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structfeat__s.html">feat_s</a> {
<a name="l00156"></a><a class="code" href="structfeat__s.html#a65eb722aadd471310eff84ac5946d98f">00156</a>     <span class="keywordtype">int</span> <a class="code" href="structfeat__s.html#a65eb722aadd471310eff84ac5946d98f" title="Reference count.">refcount</a>;       
<a name="l00157"></a><a class="code" href="structfeat__s.html#ab58e7419bc24969680baf4289dc756ce">00157</a>     <span class="keywordtype">char</span> *<a class="code" href="structfeat__s.html#ab58e7419bc24969680baf4289dc756ce" title="Printable name for this feature type.">name</a>;         
<a name="l00158"></a><a class="code" href="structfeat__s.html#aee30d93416c0c392f946dacd58dec984">00158</a>     int32 <a class="code" href="structfeat__s.html#aee30d93416c0c392f946dacd58dec984" title="Size of input speech vector (typically, a cepstrum vector)">cepsize</a>;      
<a name="l00159"></a><a class="code" href="structfeat__s.html#a5b4ed4ce256ddcc3e97864cbbc8547a2">00159</a>     int32 <a class="code" href="structfeat__s.html#a5b4ed4ce256ddcc3e97864cbbc8547a2" title="Number of feature streams; e.g., 4 in Sphinx-II.">n_stream</a>;     
<a name="l00160"></a><a class="code" href="structfeat__s.html#ac32cf69fcc131caeaa44a2e37ec33fcc">00160</a>     int32 *<a class="code" href="structfeat__s.html#ac32cf69fcc131caeaa44a2e37ec33fcc" title="Vector length of each feature stream.">stream_len</a>;  
<a name="l00161"></a><a class="code" href="structfeat__s.html#a02cf7454beea5fc6968165cfd17a7f34">00161</a>     int32 <a class="code" href="structfeat__s.html#a02cf7454beea5fc6968165cfd17a7f34" title="Number of extra frames around given input frame needed to compute corresponding output feature (so to...">window_size</a>;  
<a name="l00163"></a><a class="code" href="structfeat__s.html#afe74101645e3e9dafe07d78f68ddf694">00163</a>     int32 <a class="code" href="structfeat__s.html#afe74101645e3e9dafe07d78f68ddf694" title="Number of subvectors.">n_sv</a>;         
<a name="l00164"></a><a class="code" href="structfeat__s.html#a9b2dd7337d4ef635b5d08ff31a82a307">00164</a>     int32 *<a class="code" href="structfeat__s.html#a9b2dd7337d4ef635b5d08ff31a82a307" title="Vector length of each subvector.">sv_len</a>;      
<a name="l00165"></a><a class="code" href="structfeat__s.html#a0a89f7965e2db52b32519d967d7d13db">00165</a>     int32 **<a class="code" href="structfeat__s.html#a0a89f7965e2db52b32519d967d7d13db" title="Subvector specification (or NULL for none)">subvecs</a>;    
<a name="l00166"></a><a class="code" href="structfeat__s.html#af747bcddb70ea570fc07e8cefc2f8896">00166</a>     mfcc_t *<a class="code" href="structfeat__s.html#af747bcddb70ea570fc07e8cefc2f8896" title="Temporary copy buffer for subvector projection.">sv_buf</a>;      
<a name="l00167"></a><a class="code" href="structfeat__s.html#a32f835789890a70dab6271491f1400e3">00167</a>     int32 <a class="code" href="structfeat__s.html#a32f835789890a70dab6271491f1400e3" title="Total dimensionality of subvector (length of sv_buf)">sv_dim</a>;       
<a name="l00169"></a><a class="code" href="structfeat__s.html#a3e31d666805a9183f3188249bb6ff45f">00169</a>     <a class="code" href="cmn_8h.html#a9384c411b10e9db9745cfb550a5c7652" title="Types of cepstral mean normalization to apply to the features.">cmn_type_t</a> <a class="code" href="structfeat__s.html#a3e31d666805a9183f3188249bb6ff45f" title="Type of CMN to be performed on each utterance.">cmn</a>;     
<a name="l00170"></a><a class="code" href="structfeat__s.html#a7b222bd84282defdabdba35987e7ae7b">00170</a>     int32 <a class="code" href="structfeat__s.html#a7b222bd84282defdabdba35987e7ae7b" title="Whether variance normalization is to be performed on each utt; Irrelevant if no CMN is performed...">varnorm</a>;      
<a name="l00172"></a><a class="code" href="structfeat__s.html#a4580c133e0bb9b9e2856f66482e91d3d">00172</a>     <a class="code" href="agc_8h.html#a5524df49e0425cc6b1c002bc704a8103" title="Types of acoustic gain control to apply to the features.">agc_type_t</a> <a class="code" href="structfeat__s.html#a4580c133e0bb9b9e2856f66482e91d3d" title="Type of AGC to be performed on each utterance.">agc</a>;     
<a name="l00186"></a><a class="code" href="structfeat__s.html#a0c021e8a3c3e06cfd53ff1294024f0c9">00186</a>     void (*<a class="code" href="structfeat__s.html#a0c021e8a3c3e06cfd53ff1294024f0c9" title="Feature computation function.">compute_feat</a>)(<span class="keyword">struct </span><a class="code" href="structfeat__s.html">feat_s</a> *fcb, mfcc_t **input, mfcc_t **feat);
<a name="l00187"></a><a class="code" href="structfeat__s.html#af405f775cc9df57701f93f2056be3c4a">00187</a>     <a class="code" href="structcmn__t.html" title="wrapper of operation of the cepstral mean normalization.">cmn_t</a> *<a class="code" href="structfeat__s.html#af405f775cc9df57701f93f2056be3c4a" title="Structure that stores the temporary variables for cepstral means normalization.">cmn_struct</a>;  
<a name="l00189"></a><a class="code" href="structfeat__s.html#a2cc3e4a25a696379e8843d36cfcf3656">00189</a>     <a class="code" href="structagc__s.html" title="Structure holding data for doing AGC.">agc_t</a> *<a class="code" href="structfeat__s.html#a2cc3e4a25a696379e8843d36cfcf3656" title="Structure that stores the temporary variables for acoustic gain control.">agc_struct</a>;  
<a name="l00192"></a><a class="code" href="structfeat__s.html#a9b5c45065c30c9b6b610e54479b3f2c8">00192</a>     mfcc_t **<a class="code" href="structfeat__s.html#a9b5c45065c30c9b6b610e54479b3f2c8" title="Circular buffer of MFCC frames for live feature computation.">cepbuf</a>;    
<a name="l00193"></a><a class="code" href="structfeat__s.html#a0ffb1581086d94546b5e91e9ab685cb7">00193</a>     mfcc_t **<a class="code" href="structfeat__s.html#a0ffb1581086d94546b5e91e9ab685cb7" title="Array of pointers into cepbuf to handle border cases.">tmpcepbuf</a>; 
<a name="l00194"></a><a class="code" href="structfeat__s.html#a9bd6277ec5f03e103b9c8a67579a2822">00194</a>     int32   <a class="code" href="structfeat__s.html#a9bd6277ec5f03e103b9c8a67579a2822" title="Write index in cepbuf.">bufpos</a>;     
<a name="l00195"></a><a class="code" href="structfeat__s.html#ad27f63c459eb46462e28b2a23d8f8a6f">00195</a>     int32   <a class="code" href="structfeat__s.html#ad27f63c459eb46462e28b2a23d8f8a6f" title="Read index in cepbuf.">curpos</a>;     
<a name="l00197"></a><a class="code" href="structfeat__s.html#a2c54fea16330caf82c5f516137c2d454">00197</a>     mfcc_t ***<a class="code" href="structfeat__s.html#a2c54fea16330caf82c5f516137c2d454" title="Array of linear transformations (for LDA, MLLT, or whatever)">lda</a>; 
<a name="l00198"></a><a class="code" href="structfeat__s.html#a2078107cc1c82d6c0b4f93bfbb75dd7a">00198</a>     uint32 <a class="code" href="structfeat__s.html#a2078107cc1c82d6c0b4f93bfbb75dd7a" title="Number of linear transformations in lda.">n_lda</a>;   
<a name="l00199"></a><a class="code" href="structfeat__s.html#acbebc734e2c212aa7078b29531a78bc7">00199</a>     uint32 <a class="code" href="structfeat__s.html#acbebc734e2c212aa7078b29531a78bc7" title="Output dimensionality.">out_dim</a>; 
<a name="l00200"></a>00200 } <a class="code" href="structfeat__t.html" title="Structure for describing a speech feature type Structure for describing a speech feature type (no...">feat_t</a>;
<a name="l00201"></a>00201 
<a name="l00205"></a><a class="code" href="feat_8h.html#a196b41ab9dfffcea885ee1a9075ede9e">00205</a> <span class="preprocessor">#define feat_name(f)            ((f)-&gt;name)</span>
<a name="l00206"></a>00206 <span class="preprocessor"></span>
<a name="l00209"></a><a class="code" href="feat_8h.html#ac691993ec890de3daefbcffe89788f5a">00209</a> <span class="preprocessor">#define feat_cepsize(f)         ((f)-&gt;cepsize)</span>
<a name="l00210"></a>00210 <span class="preprocessor"></span>
<a name="l00213"></a><a class="code" href="feat_8h.html#a69cdcd91578c26565c7653ad6f2eb510">00213</a> <span class="preprocessor">#define feat_window_size(f)     ((f)-&gt;window_size)</span>
<a name="l00214"></a>00214 <span class="preprocessor"></span>
<a name="l00219"></a><a class="code" href="feat_8h.html#a1fe686c88d5b0598d7509af21acd9b76">00219</a> <span class="preprocessor">#define feat_n_stream(f)        ((f)-&gt;n_stream)</span>
<a name="l00220"></a>00220 <span class="preprocessor"></span>
<a name="l00225"></a><a class="code" href="feat_8h.html#a3d50283fc416fff87f3b907a12c2c11e">00225</a> <span class="preprocessor">#define feat_stream_len(f,i)    ((f)-&gt;stream_len[i])</span>
<a name="l00226"></a>00226 <span class="preprocessor"></span>
<a name="l00229"></a><a class="code" href="feat_8h.html#abadd19e2cc72df33e81e9d73a7ddffdb">00229</a> <span class="preprocessor">#define feat_dimension1(f)      ((f)-&gt;n_sv ? (f)-&gt;n_sv : f-&gt;n_stream)</span>
<a name="l00230"></a>00230 <span class="preprocessor"></span>
<a name="l00233"></a><a class="code" href="feat_8h.html#a5bd29a80c7f23f281d55555757f97f34">00233</a> <span class="preprocessor">#define feat_dimension2(f,i)    ((f)-&gt;sv_len ? (f)-&gt;sv_len[i] : f-&gt;stream_len[i])</span>
<a name="l00234"></a>00234 <span class="preprocessor"></span>
<a name="l00237"></a><a class="code" href="feat_8h.html#a66dc16aeea4307bf36ec4e08e05d0c7c">00237</a> <span class="preprocessor">#define feat_dimension(f)       ((f)-&gt;out_dim)</span>
<a name="l00238"></a>00238 <span class="preprocessor"></span>
<a name="l00241"></a><a class="code" href="feat_8h.html#afc74f6114cc2151cef1c9e40bdd45e46">00241</a> <span class="preprocessor">#define feat_stream_lengths(f)  ((f)-&gt;sv_len ? (f)-&gt;sv_len : f-&gt;stream_len)</span>
<a name="l00242"></a>00242 <span class="preprocessor"></span>
<a name="l00265"></a>00265 SPHINXBASE_EXPORT
<a name="l00266"></a>00266 int32 **<a class="code" href="feat_8h.html#a613aca09a7f45f5ddc550efe685cb83b" title="Parse subvector specification string.">parse_subvecs</a>(<span class="keywordtype">char</span> <span class="keyword">const</span> *str);
<a name="l00267"></a>00267 
<a name="l00271"></a>00271 SPHINXBASE_EXPORT
<a name="l00272"></a>00272 <span class="keywordtype">void</span> <a class="code" href="feat_8h.html#ad209a1028b315a96a3a2447eccdb8605" title="Free array of subvector specs.">subvecs_free</a>(int32 **<a class="code" href="structfeat__s.html#a0a89f7965e2db52b32519d967d7d13db" title="Subvector specification (or NULL for none)">subvecs</a>);
<a name="l00273"></a>00273 
<a name="l00274"></a>00274 
<a name="l00287"></a>00287 SPHINXBASE_EXPORT
<a name="l00288"></a>00288 mfcc_t ***<a class="code" href="feat_8h.html#a03071d6d5c6b233117871f583c258b1e" title="Allocate an array to hold several frames worth of feature vectors.">feat_array_alloc</a>(<a class="code" href="structfeat__t.html" title="Structure for describing a speech feature type Structure for describing a speech feature type (no...">feat_t</a> *fcb, 
<a name="l00290"></a>00290                            int32 nfr    
<a name="l00291"></a>00291     );
<a name="l00292"></a>00292 
<a name="l00296"></a>00296 SPHINXBASE_EXPORT
<a name="l00297"></a>00297 <span class="keywordtype">void</span> <a class="code" href="feat_8h.html#ad5c87f80af670b7a949af65bc3ba82a8" title="Free a buffer allocated with feat_array_alloc()">feat_array_free</a>(mfcc_t ***feat);
<a name="l00298"></a>00298 
<a name="l00299"></a>00299 
<a name="l00315"></a>00315 SPHINXBASE_EXPORT
<a name="l00316"></a>00316 <a class="code" href="structfeat__t.html" title="Structure for describing a speech feature type Structure for describing a speech feature type (no...">feat_t</a> *<a class="code" href="feat_8h.html#a7a5e2e02e99e368e1e9e3b1ded35e3dc" title="Initialize feature module to use the selected type of feature stream.">feat_init</a>(<span class="keywordtype">char</span> <span class="keyword">const</span> *type,
<a name="l00317"></a>00317                   <a class="code" href="cmn_8h.html#a9384c411b10e9db9745cfb550a5c7652" title="Types of cepstral mean normalization to apply to the features.">cmn_type_t</a> <a class="code" href="structfeat__s.html#a3e31d666805a9183f3188249bb6ff45f" title="Type of CMN to be performed on each utterance.">cmn</a>, 
<a name="l00320"></a>00320                   int32 <a class="code" href="structfeat__s.html#a7b222bd84282defdabdba35987e7ae7b" title="Whether variance normalization is to be performed on each utt; Irrelevant if no CMN is performed...">varnorm</a>,  
<a name="l00323"></a>00323                   <a class="code" href="agc_8h.html#a5524df49e0425cc6b1c002bc704a8103" title="Types of acoustic gain control to apply to the features.">agc_type_t</a> <a class="code" href="structfeat__s.html#a4580c133e0bb9b9e2856f66482e91d3d" title="Type of AGC to be performed on each utterance.">agc</a>, 
<a name="l00325"></a>00325                   int32 breport, 
<a name="l00326"></a>00326                   int32 <a class="code" href="structfeat__s.html#aee30d93416c0c392f946dacd58dec984" title="Size of input speech vector (typically, a cepstrum vector)">cepsize</a>  
<a name="l00329"></a>00329     );
<a name="l00330"></a>00330 
<a name="l00335"></a>00335 SPHINXBASE_EXPORT
<a name="l00336"></a>00336 int32 <a class="code" href="feat_8h.html#a7639fbc34e3328d7e3259e61372c64b8" title="Add an LDA transformation to the feature module from a file.">feat_read_lda</a>(<a class="code" href="structfeat__t.html" title="Structure for describing a speech feature type Structure for describing a speech feature type (no...">feat_t</a> *feat,        
<a name="l00337"></a>00337                     <span class="keyword">const</span> <span class="keywordtype">char</span> *ldafile, 
<a name="l00338"></a>00338                     int32 dim            
<a name="l00339"></a>00339     );
<a name="l00340"></a>00340 
<a name="l00344"></a>00344 SPHINXBASE_EXPORT
<a name="l00345"></a>00345 <span class="keywordtype">void</span> <a class="code" href="feat_8h.html#a7452702cb435ea9244c7e1f61bbf5da1" title="Transform a block of features using the feature module&amp;#39;s LDA transform.">feat_lda_transform</a>(<a class="code" href="structfeat__t.html" title="Structure for describing a speech feature type Structure for describing a speech feature type (no...">feat_t</a> *fcb,            
<a name="l00346"></a>00346                         mfcc_t ***inout_feat,   
<a name="l00347"></a>00347                         uint32 nfr              
<a name="l00348"></a>00348     );
<a name="l00349"></a>00349 
<a name="l00368"></a>00368 SPHINXBASE_EXPORT
<a name="l00369"></a>00369 <span class="keywordtype">int</span> <a class="code" href="feat_8h.html#a9a79c7278d484fa8178cd7c06156b794" title="Add a subvector specification to the feature module.">feat_set_subvecs</a>(<a class="code" href="structfeat__t.html" title="Structure for describing a speech feature type Structure for describing a speech feature type (no...">feat_t</a> *fcb, int32 **<a class="code" href="structfeat__s.html#a0a89f7965e2db52b32519d967d7d13db" title="Subvector specification (or NULL for none)">subvecs</a>);
<a name="l00370"></a>00370 
<a name="l00374"></a>00374 SPHINXBASE_EXPORT
<a name="l00375"></a>00375 <span class="keywordtype">void</span> <a class="code" href="feat_8h.html#afeaef030a5ec32c2164b5bd55e912714" title="Print the given block of feature vectors to the given FILE.">feat_print</a>(<a class="code" href="structfeat__t.html" title="Structure for describing a speech feature type Structure for describing a speech feature type (no...">feat_t</a> *fcb,            
<a name="l00376"></a>00376                 mfcc_t ***feat,         
<a name="l00377"></a>00377                 int32 nfr,              
<a name="l00378"></a>00378                 FILE *fp                
<a name="l00379"></a>00379     );
<a name="l00380"></a>00380 
<a name="l00381"></a>00381   
<a name="l00398"></a>00398 SPHINXBASE_EXPORT
<a name="l00399"></a>00399 int32 <a class="code" href="feat_8h.html#a918e21c2b28a6951a83c64f7023126a7" title="Read a specified MFC file (or given segment within it), perform CMN/AGC as indicated by fcb...">feat_s2mfc2feat</a>(<a class="code" href="structfeat__t.html" title="Structure for describing a speech feature type Structure for describing a speech feature type (no...">feat_t</a> *fcb,      
<a name="l00400"></a>00400                       <span class="keyword">const</span> <span class="keywordtype">char</span> *file, 
<a name="l00401"></a>00401                       <span class="keyword">const</span> <span class="keywordtype">char</span> *dir,  
<a name="l00403"></a>00403                       <span class="keyword">const</span> <span class="keywordtype">char</span> *cepext,
<a name="l00406"></a>00406                       int32 sf, int32 ef,   <span class="comment">/* Start/End frames</span>
<a name="l00407"></a>00407 <span class="comment">                                               within file to be read. Use</span>
<a name="l00408"></a>00408 <span class="comment">                                               0,-1 to process entire</span>
<a name="l00409"></a>00409 <span class="comment">                                               file */</span>
<a name="l00410"></a>00410                       mfcc_t ***feat,   
<a name="l00412"></a>00412                       int32 maxfr       
<a name="l00416"></a>00416     );
<a name="l00417"></a>00417 
<a name="l00418"></a>00418 
<a name="l00447"></a>00447 SPHINXBASE_EXPORT
<a name="l00448"></a>00448 int32 <a class="code" href="feat_8h.html#a68bf7d2c15e3f76b08833449eb254aed" title="Feature computation routine for live mode decoder.">feat_s2mfc2feat_live</a>(<a class="code" href="structfeat__t.html" title="Structure for describing a speech feature type Structure for describing a speech feature type (no...">feat_t</a>  *fcb,     
<a name="l00449"></a>00449                            mfcc_t **uttcep,  
<a name="l00450"></a>00450                            int32 *inout_ncep,
<a name="l00452"></a>00452                            int32 beginutt,   
<a name="l00453"></a>00453                            int32 endutt,     
<a name="l00454"></a>00454                            mfcc_t ***ofeat   
<a name="l00457"></a>00457     );
<a name="l00458"></a>00458 
<a name="l00459"></a>00459 
<a name="l00465"></a>00465 SPHINXBASE_EXPORT
<a name="l00466"></a>00466 <a class="code" href="structfeat__t.html" title="Structure for describing a speech feature type Structure for describing a speech feature type (no...">feat_t</a> *<a class="code" href="feat_8h.html#a80d6eabf01ff119d324a07c1de8fda80" title="Retain ownership of feat_t.">feat_retain</a>(<a class="code" href="structfeat__t.html" title="Structure for describing a speech feature type Structure for describing a speech feature type (no...">feat_t</a> *f);
<a name="l00467"></a>00467 
<a name="l00473"></a>00473 SPHINXBASE_EXPORT
<a name="l00474"></a>00474 <span class="keywordtype">int</span> <a class="code" href="feat_8h.html#a98463b4ab5fe4265fc817523b0e25ee9" title="Release resource associated with feat_t.">feat_free</a>(<a class="code" href="structfeat__t.html" title="Structure for describing a speech feature type Structure for describing a speech feature type (no...">feat_t</a> *f 
<a name="l00475"></a>00475     );
<a name="l00476"></a>00476 
<a name="l00480"></a>00480 SPHINXBASE_EXPORT
<a name="l00481"></a>00481 <span class="keywordtype">void</span> <a class="code" href="feat_8h.html#ae3e67bd629f9756ddb6c5a599d223f6e" title="Report the feat_t data structure.">feat_report</a>(<a class="code" href="structfeat__t.html" title="Structure for describing a speech feature type Structure for describing a speech feature type (no...">feat_t</a> *f 
<a name="l00482"></a>00482     );
<a name="l00483"></a>00483 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00484"></a>00484 <span class="preprocessor"></span>}
<a name="l00485"></a>00485 <span class="preprocessor">#endif</span>
<a name="l00486"></a>00486 <span class="preprocessor"></span>
<a name="l00487"></a>00487 
<a name="l00488"></a>00488 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="feat_8h.html">feat.h</a>      </li>
      <li class="footer">Generated on Tue Apr 19 2011 for SphinxBase by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li>
    </ul>
  </div>

</body>
</html>