Sophie

Sophie

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

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/fe.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('fe_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<h1>include/sphinxbase/fe.h</h1>  </div>
</div>
<div class="contents">
<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) 1996-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 
<a name="l00038"></a>00038 <span class="comment">/*</span>
<a name="l00039"></a>00039 <span class="comment"> * fe.h</span>
<a name="l00040"></a>00040 <span class="comment"> * </span>
<a name="l00041"></a>00041 <span class="comment"> * $Log: fe.h,v $</span>
<a name="l00042"></a>00042 <span class="comment"> * Revision 1.11  2005/02/05 02:15:02  egouvea</span>
<a name="l00043"></a>00043 <span class="comment"> * Removed fe_process(), never used</span>
<a name="l00044"></a>00044 <span class="comment"> *</span>
<a name="l00045"></a>00045 <span class="comment"> * Revision 1.10  2004/12/10 16:48:55  rkm</span>
<a name="l00046"></a>00046 <span class="comment"> * Added continuous density acoustic model handling</span>
<a name="l00047"></a>00047 <span class="comment"> *</span>
<a name="l00048"></a>00048 <span class="comment"> *</span>
<a name="l00049"></a>00049 <span class="comment"> */</span>
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 <span class="preprocessor">#if defined(WIN32) &amp;&amp; !defined(GNUWINCE)</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#define srand48(x) srand(x)</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#define lrand48() rand()</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span>
<a name="l00056"></a>00056 <span class="preprocessor">#ifndef _NEW_FE_H_</span>
<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#define _NEW_FE_H_</span>
<a name="l00058"></a>00058 <span class="preprocessor"></span>
<a name="l00059"></a>00059 <span class="comment">/* Win32/WinCE DLL gunk */</span>
<a name="l00060"></a>00060 <span class="preprocessor">#include &lt;sphinxbase/sphinxbase_export.h&gt;</span>
<a name="l00061"></a>00061 
<a name="l00062"></a>00062 <span class="preprocessor">#include &lt;sphinxbase/cmd_ln.h&gt;</span>
<a name="l00063"></a>00063 <span class="preprocessor">#include &lt;sphinxbase/fixpoint.h&gt;</span>
<a name="l00064"></a>00064 
<a name="l00065"></a>00065 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00067"></a>00067 <span class="preprocessor">#endif</span>
<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor">#if 0</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="comment">/* Fool Emacs. */</span>
<a name="l00070"></a>00070 }
<a name="l00071"></a>00071 <span class="preprocessor">#endif</span>
<a name="l00072"></a>00072 <span class="preprocessor"></span>
<a name="l00073"></a>00073 <span class="preprocessor">#ifdef WORDS_BIGENDIAN</span>
<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#define NATIVE_ENDIAN &quot;big&quot;</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#define NATIVE_ENDIAN &quot;little&quot;</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span>
<a name="l00080"></a>00080 <span class="preprocessor">#define DEFAULT_SAMPLING_RATE 16000</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span>
<a name="l00082"></a>00082 <span class="preprocessor">#define DEFAULT_FRAME_RATE 100</span>
<a name="l00083"></a>00083 <span class="preprocessor"></span>
<a name="l00085"></a>00085 <span class="preprocessor">#define DEFAULT_FRAME_SHIFT 160</span>
<a name="l00086"></a>00086 <span class="preprocessor"></span>
<a name="l00087"></a>00087 <span class="preprocessor">#define DEFAULT_WINDOW_LENGTH 0.025625 </span>
<a name="l00088"></a>00088 <span class="preprocessor"></span>
<a name="l00089"></a>00089 <span class="preprocessor">#define DEFAULT_FFT_SIZE 512</span>
<a name="l00090"></a>00090 <span class="preprocessor"></span>
<a name="l00091"></a>00091 <span class="preprocessor">#define DEFAULT_NUM_CEPSTRA 13</span>
<a name="l00092"></a>00092 <span class="preprocessor"></span>
<a name="l00093"></a>00093 <span class="preprocessor">#define DEFAULT_NUM_FILTERS 40</span>
<a name="l00094"></a>00094 <span class="preprocessor"></span>
<a name="l00095"></a>00095 <span class="preprocessor">#define DEFAULT_LOWER_FILT_FREQ 133.33334</span>
<a name="l00096"></a>00096 <span class="preprocessor"></span>
<a name="l00097"></a>00097 <span class="preprocessor">#define DEFAULT_UPPER_FILT_FREQ 6855.4976</span>
<a name="l00098"></a>00098 <span class="preprocessor"></span>
<a name="l00099"></a>00099 <span class="preprocessor">#define DEFAULT_PRE_EMPHASIS_ALPHA 0.97</span>
<a name="l00100"></a>00100 <span class="preprocessor"></span>
<a name="l00101"></a>00101 <span class="preprocessor">#define DEFAULT_WARP_TYPE &quot;inverse_linear&quot;</span>
<a name="l00102"></a>00102 <span class="preprocessor"></span>
<a name="l00103"></a>00103 <span class="preprocessor">#define SEED  -1</span>
<a name="l00104"></a>00104 <span class="preprocessor"></span>
<a name="l00105"></a>00105 <span class="preprocessor">#define waveform_to_cepstral_command_line_macro() \</span>
<a name="l00106"></a>00106 <span class="preprocessor">  { &quot;-logspec&quot;, \</span>
<a name="l00107"></a>00107 <span class="preprocessor">    ARG_BOOLEAN, \</span>
<a name="l00108"></a>00108 <span class="preprocessor">    &quot;no&quot;, \</span>
<a name="l00109"></a>00109 <span class="preprocessor">    &quot;Write out logspectral files instead of cepstra&quot; }, \</span>
<a name="l00110"></a>00110 <span class="preprocessor">   \</span>
<a name="l00111"></a>00111 <span class="preprocessor">  { &quot;-smoothspec&quot;, \</span>
<a name="l00112"></a>00112 <span class="preprocessor">    ARG_BOOLEAN, \</span>
<a name="l00113"></a>00113 <span class="preprocessor">    &quot;no&quot;, \</span>
<a name="l00114"></a>00114 <span class="preprocessor">    &quot;Write out cepstral-smoothed logspectral files&quot; }, \</span>
<a name="l00115"></a>00115 <span class="preprocessor">   \</span>
<a name="l00116"></a>00116 <span class="preprocessor">  { &quot;-transform&quot;, \</span>
<a name="l00117"></a>00117 <span class="preprocessor">    ARG_STRING, \</span>
<a name="l00118"></a>00118 <span class="preprocessor">    &quot;legacy&quot;, \</span>
<a name="l00119"></a>00119 <span class="preprocessor">    &quot;Which type of transform to use to calculate cepstra (legacy, dct, or htk)&quot; }, \</span>
<a name="l00120"></a>00120 <span class="preprocessor">   \</span>
<a name="l00121"></a>00121 <span class="preprocessor">  { &quot;-alpha&quot;, \</span>
<a name="l00122"></a>00122 <span class="preprocessor">    ARG_FLOAT32, \</span>
<a name="l00123"></a>00123 <span class="preprocessor">    ARG_STRINGIFY(DEFAULT_PRE_EMPHASIS_ALPHA), \</span>
<a name="l00124"></a>00124 <span class="preprocessor">    &quot;Preemphasis parameter&quot; }, \</span>
<a name="l00125"></a>00125 <span class="preprocessor">   \</span>
<a name="l00126"></a>00126 <span class="preprocessor">  { &quot;-samprate&quot;, \</span>
<a name="l00127"></a>00127 <span class="preprocessor">    ARG_FLOAT32, \</span>
<a name="l00128"></a>00128 <span class="preprocessor">    ARG_STRINGIFY(DEFAULT_SAMPLING_RATE), \</span>
<a name="l00129"></a>00129 <span class="preprocessor">    &quot;Sampling rate&quot; }, \</span>
<a name="l00130"></a>00130 <span class="preprocessor">   \</span>
<a name="l00131"></a>00131 <span class="preprocessor">  { &quot;-frate&quot;, \</span>
<a name="l00132"></a>00132 <span class="preprocessor">    ARG_INT32, \</span>
<a name="l00133"></a>00133 <span class="preprocessor">    ARG_STRINGIFY(DEFAULT_FRAME_RATE), \</span>
<a name="l00134"></a>00134 <span class="preprocessor">    &quot;Frame rate&quot; }, \</span>
<a name="l00135"></a>00135 <span class="preprocessor">   \</span>
<a name="l00136"></a>00136 <span class="preprocessor">  { &quot;-wlen&quot;, \</span>
<a name="l00137"></a>00137 <span class="preprocessor">    ARG_FLOAT32, \</span>
<a name="l00138"></a>00138 <span class="preprocessor">    ARG_STRINGIFY(DEFAULT_WINDOW_LENGTH), \</span>
<a name="l00139"></a>00139 <span class="preprocessor">    &quot;Hamming window length&quot; }, \</span>
<a name="l00140"></a>00140 <span class="preprocessor">   \</span>
<a name="l00141"></a>00141 <span class="preprocessor">  { &quot;-nfft&quot;, \</span>
<a name="l00142"></a>00142 <span class="preprocessor">    ARG_INT32, \</span>
<a name="l00143"></a>00143 <span class="preprocessor">    ARG_STRINGIFY(DEFAULT_FFT_SIZE), \</span>
<a name="l00144"></a>00144 <span class="preprocessor">    &quot;Size of FFT&quot; }, \</span>
<a name="l00145"></a>00145 <span class="preprocessor">   \</span>
<a name="l00146"></a>00146 <span class="preprocessor">  { &quot;-nfilt&quot;, \</span>
<a name="l00147"></a>00147 <span class="preprocessor">    ARG_INT32, \</span>
<a name="l00148"></a>00148 <span class="preprocessor">    ARG_STRINGIFY(DEFAULT_NUM_FILTERS), \</span>
<a name="l00149"></a>00149 <span class="preprocessor">    &quot;Number of filter banks&quot; }, \</span>
<a name="l00150"></a>00150 <span class="preprocessor">   \</span>
<a name="l00151"></a>00151 <span class="preprocessor">  { &quot;-lowerf&quot;, \</span>
<a name="l00152"></a>00152 <span class="preprocessor">    ARG_FLOAT32, \</span>
<a name="l00153"></a>00153 <span class="preprocessor">    ARG_STRINGIFY(DEFAULT_LOWER_FILT_FREQ), \</span>
<a name="l00154"></a>00154 <span class="preprocessor">    &quot;Lower edge of filters&quot; }, \</span>
<a name="l00155"></a>00155 <span class="preprocessor">   \</span>
<a name="l00156"></a>00156 <span class="preprocessor">  { &quot;-upperf&quot;, \</span>
<a name="l00157"></a>00157 <span class="preprocessor">    ARG_FLOAT32, \</span>
<a name="l00158"></a>00158 <span class="preprocessor">    ARG_STRINGIFY(DEFAULT_UPPER_FILT_FREQ), \</span>
<a name="l00159"></a>00159 <span class="preprocessor">    &quot;Upper edge of filters&quot; }, \</span>
<a name="l00160"></a>00160 <span class="preprocessor">   \</span>
<a name="l00161"></a>00161 <span class="preprocessor">  { &quot;-unit_area&quot;, \</span>
<a name="l00162"></a>00162 <span class="preprocessor">    ARG_BOOLEAN, \</span>
<a name="l00163"></a>00163 <span class="preprocessor">    &quot;yes&quot;, \</span>
<a name="l00164"></a>00164 <span class="preprocessor">    &quot;Normalize mel filters to unit area&quot; }, \</span>
<a name="l00165"></a>00165 <span class="preprocessor">   \</span>
<a name="l00166"></a>00166 <span class="preprocessor">  { &quot;-round_filters&quot;, \</span>
<a name="l00167"></a>00167 <span class="preprocessor">    ARG_BOOLEAN, \</span>
<a name="l00168"></a>00168 <span class="preprocessor">    &quot;yes&quot;, \</span>
<a name="l00169"></a>00169 <span class="preprocessor">    &quot;Round mel filter frequencies to DFT points&quot; }, \</span>
<a name="l00170"></a>00170 <span class="preprocessor">   \</span>
<a name="l00171"></a>00171 <span class="preprocessor">  { &quot;-ncep&quot;, \</span>
<a name="l00172"></a>00172 <span class="preprocessor">    ARG_INT32, \</span>
<a name="l00173"></a>00173 <span class="preprocessor">    ARG_STRINGIFY(DEFAULT_NUM_CEPSTRA), \</span>
<a name="l00174"></a>00174 <span class="preprocessor">    &quot;Number of cep coefficients&quot; }, \</span>
<a name="l00175"></a>00175 <span class="preprocessor">   \</span>
<a name="l00176"></a>00176 <span class="preprocessor">  { &quot;-doublebw&quot;, \</span>
<a name="l00177"></a>00177 <span class="preprocessor">    ARG_BOOLEAN, \</span>
<a name="l00178"></a>00178 <span class="preprocessor">    &quot;no&quot;, \</span>
<a name="l00179"></a>00179 <span class="preprocessor">    &quot;Use double bandwidth filters (same center freq)&quot; }, \</span>
<a name="l00180"></a>00180 <span class="preprocessor">   \</span>
<a name="l00181"></a>00181 <span class="preprocessor">  { &quot;-lifter&quot;, \</span>
<a name="l00182"></a>00182 <span class="preprocessor">    ARG_INT32, \</span>
<a name="l00183"></a>00183 <span class="preprocessor">    &quot;0&quot;, \</span>
<a name="l00184"></a>00184 <span class="preprocessor">    &quot;Length of sin-curve for liftering, or 0 for no liftering.&quot; }, \</span>
<a name="l00185"></a>00185 <span class="preprocessor">   \</span>
<a name="l00186"></a>00186 <span class="preprocessor">  { &quot;-input_endian&quot;, \</span>
<a name="l00187"></a>00187 <span class="preprocessor">    ARG_STRING, \</span>
<a name="l00188"></a>00188 <span class="preprocessor">    NATIVE_ENDIAN, \</span>
<a name="l00189"></a>00189 <span class="preprocessor">    &quot;Endianness of input data, big or little, ignored if NIST or MS Wav&quot; }, \</span>
<a name="l00190"></a>00190 <span class="preprocessor">   \</span>
<a name="l00191"></a>00191 <span class="preprocessor">  { &quot;-warp_type&quot;, \</span>
<a name="l00192"></a>00192 <span class="preprocessor">    ARG_STRING, \</span>
<a name="l00193"></a>00193 <span class="preprocessor">    DEFAULT_WARP_TYPE, \</span>
<a name="l00194"></a>00194 <span class="preprocessor">    &quot;Warping function type (or shape)&quot; }, \</span>
<a name="l00195"></a>00195 <span class="preprocessor">   \</span>
<a name="l00196"></a>00196 <span class="preprocessor">  { &quot;-warp_params&quot;, \</span>
<a name="l00197"></a>00197 <span class="preprocessor">    ARG_STRING, \</span>
<a name="l00198"></a>00198 <span class="preprocessor">    NULL, \</span>
<a name="l00199"></a>00199 <span class="preprocessor">    &quot;Parameters defining the warping function&quot; }, \</span>
<a name="l00200"></a>00200 <span class="preprocessor">   \</span>
<a name="l00201"></a>00201 <span class="preprocessor">  { &quot;-dither&quot;, \</span>
<a name="l00202"></a>00202 <span class="preprocessor">    ARG_BOOLEAN, \</span>
<a name="l00203"></a>00203 <span class="preprocessor">    &quot;no&quot;, \</span>
<a name="l00204"></a>00204 <span class="preprocessor">    &quot;Add 1/2-bit noise&quot; }, \</span>
<a name="l00205"></a>00205 <span class="preprocessor">   \</span>
<a name="l00206"></a>00206 <span class="preprocessor">  { &quot;-seed&quot;, \</span>
<a name="l00207"></a>00207 <span class="preprocessor">    ARG_INT32, \</span>
<a name="l00208"></a>00208 <span class="preprocessor">    ARG_STRINGIFY(SEED), \</span>
<a name="l00209"></a>00209 <span class="preprocessor">    &quot;Seed for random number generator; if less than zero, pick our own&quot; }, \</span>
<a name="l00210"></a>00210 <span class="preprocessor">   \</span>
<a name="l00211"></a>00211 <span class="preprocessor">  { &quot;-remove_dc&quot;, \</span>
<a name="l00212"></a>00212 <span class="preprocessor">    ARG_BOOLEAN, \</span>
<a name="l00213"></a>00213 <span class="preprocessor">    &quot;no&quot;, \</span>
<a name="l00214"></a>00214 <span class="preprocessor">    &quot;Remove DC offset from each frame&quot; }, \</span>
<a name="l00215"></a>00215 <span class="preprocessor">                                          \</span>
<a name="l00216"></a>00216 <span class="preprocessor">  { &quot;-verbose&quot;, \</span>
<a name="l00217"></a>00217 <span class="preprocessor">    ARG_BOOLEAN, \</span>
<a name="l00218"></a>00218 <span class="preprocessor">    &quot;no&quot;, \</span>
<a name="l00219"></a>00219 <span class="preprocessor">    &quot;Show input filenames&quot; } \</span>
<a name="l00220"></a>00220 <span class="preprocessor">  </span>
<a name="l00221"></a>00221 <span class="preprocessor"></span>  
<a name="l00222"></a>00222 <span class="preprocessor">#ifdef FIXED_POINT</span>
<a name="l00223"></a>00223 <span class="preprocessor"></span>
<a name="l00224"></a>00224 <span class="keyword">typedef</span> fixed32 mfcc_t;
<a name="l00225"></a>00225 
<a name="l00227"></a>00227 <span class="preprocessor">#define FLOAT2MFCC(x) FLOAT2FIX(x)</span>
<a name="l00228"></a>00228 <span class="preprocessor"></span>
<a name="l00229"></a>00229 <span class="preprocessor">#define MFCC2FLOAT(x) FIX2FLOAT(x)</span>
<a name="l00230"></a>00230 <span class="preprocessor"></span>
<a name="l00231"></a>00231 <span class="preprocessor">#define MFCCMUL(a,b) FIXMUL(a,b)</span>
<a name="l00232"></a>00232 <span class="preprocessor"></span><span class="preprocessor">#define MFCCLN(x,in,out) FIXLN_ANY(x,in,out)</span>
<a name="l00233"></a>00233 <span class="preprocessor"></span><span class="preprocessor">#else </span><span class="comment">/* !FIXED_POINT */</span>
<a name="l00234"></a>00234 
<a name="l00236"></a>00236 <span class="keyword">typedef</span> float32 mfcc_t;
<a name="l00238"></a>00238 <span class="preprocessor">#define FLOAT2MFCC(x) (x)</span>
<a name="l00239"></a>00239 <span class="preprocessor"></span>
<a name="l00240"></a>00240 <span class="preprocessor">#define MFCC2FLOAT(x) (x)</span>
<a name="l00241"></a>00241 <span class="preprocessor"></span>
<a name="l00242"></a>00242 <span class="preprocessor">#define MFCCMUL(a,b) ((a)*(b))</span>
<a name="l00243"></a>00243 <span class="preprocessor"></span><span class="preprocessor">#define MFCCLN(x,in,out) log(x)</span>
<a name="l00244"></a>00244 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !FIXED_POINT */</span>
<a name="l00245"></a>00245 
<a name="l00249"></a>00249 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_s</a> <a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a>;
<a name="l00250"></a>00250 
<a name="l00254"></a>00254 <span class="keyword">enum</span> fe_error_e {
<a name="l00255"></a>00255         FE_SUCCESS = 0,
<a name="l00256"></a>00256         FE_OUTPUT_FILE_SUCCESS  = 0,
<a name="l00257"></a>00257         FE_CONTROL_FILE_ERROR = -1,
<a name="l00258"></a>00258         FE_START_ERROR = -2,
<a name="l00259"></a>00259         FE_UNKNOWN_SINGLE_OR_BATCH = -3,
<a name="l00260"></a>00260         FE_INPUT_FILE_OPEN_ERROR = -4,
<a name="l00261"></a>00261         FE_INPUT_FILE_READ_ERROR = -5,
<a name="l00262"></a>00262         FE_MEM_ALLOC_ERROR = -6,
<a name="l00263"></a>00263         FE_OUTPUT_FILE_WRITE_ERROR = -7,
<a name="l00264"></a>00264         FE_OUTPUT_FILE_OPEN_ERROR = -8,
<a name="l00265"></a>00265         FE_ZERO_ENERGY_ERROR = -9,
<a name="l00266"></a>00266         FE_INVALID_PARAM_ERROR =  -10
<a name="l00267"></a>00267 };
<a name="l00268"></a>00268 
<a name="l00276"></a>00276 SPHINXBASE_EXPORT
<a name="l00277"></a>00277 <a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a>* fe_init_auto(<span class="keywordtype">void</span>);
<a name="l00278"></a>00278 
<a name="l00286"></a>00286 SPHINXBASE_EXPORT
<a name="l00287"></a>00287 <a class="code" href="structarg__t.html" title="Argument definition structure.">arg_t</a> <span class="keyword">const</span> *fe_get_args(<span class="keywordtype">void</span>);
<a name="l00288"></a>00288 
<a name="l00299"></a>00299 SPHINXBASE_EXPORT
<a name="l00300"></a>00300 <a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe_init_auto_r(<a class="code" href="structcmd__ln__t.html" title="Opaque structure used to hold the results of command-line parsing.">cmd_ln_t</a> *config);
<a name="l00301"></a>00301 
<a name="l00309"></a>00309 SPHINXBASE_EXPORT
<a name="l00310"></a>00310 <a class="code" href="structcmd__ln__t.html" title="Opaque structure used to hold the results of command-line parsing.">cmd_ln_t</a> *fe_get_config(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe);
<a name="l00311"></a>00311 
<a name="l00316"></a>00316 SPHINXBASE_EXPORT
<a name="l00317"></a>00317 <span class="keywordtype">int</span> fe_start_utt(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe);
<a name="l00318"></a>00318 
<a name="l00331"></a>00331 SPHINXBASE_EXPORT
<a name="l00332"></a>00332 <span class="keywordtype">int</span> fe_get_output_size(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe);
<a name="l00333"></a>00333 
<a name="l00346"></a>00346 SPHINXBASE_EXPORT
<a name="l00347"></a>00347 <span class="keywordtype">void</span> fe_get_input_size(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe, <span class="keywordtype">int</span> *out_frame_shift,
<a name="l00348"></a>00348                        <span class="keywordtype">int</span> *out_frame_size);
<a name="l00349"></a>00349 
<a name="l00364"></a>00364 SPHINXBASE_EXPORT
<a name="l00365"></a>00365 <span class="keywordtype">int</span> fe_end_utt(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe, mfcc_t *out_cepvector, int32 *out_nframes);
<a name="l00366"></a>00366 
<a name="l00372"></a>00372 SPHINXBASE_EXPORT
<a name="l00373"></a>00373 <a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe_retain(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe);
<a name="l00374"></a>00374 
<a name="l00382"></a>00382 SPHINXBASE_EXPORT
<a name="l00383"></a>00383 <span class="keywordtype">int</span> fe_free(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe);
<a name="l00384"></a>00384 
<a name="l00393"></a>00393 SPHINXBASE_EXPORT
<a name="l00394"></a>00394 <span class="keywordtype">int</span> fe_process_frame(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe, int16 <span class="keyword">const</span> *spch,
<a name="l00395"></a>00395                      int32 nsamps, mfcc_t *out_cep);
<a name="l00396"></a>00396 
<a name="l00444"></a>00444 SPHINXBASE_EXPORT
<a name="l00445"></a>00445 <span class="keywordtype">int</span> fe_process_frames(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe,
<a name="l00446"></a>00446                       int16 <span class="keyword">const</span> **inout_spch,
<a name="l00447"></a>00447                       <span class="keywordtype">size_t</span> *inout_nsamps,
<a name="l00448"></a>00448                       mfcc_t **buf_cep,
<a name="l00449"></a>00449                       int32 *inout_nframes);
<a name="l00450"></a>00450 
<a name="l00466"></a>00466 SPHINXBASE_EXPORT
<a name="l00467"></a>00467 <span class="keywordtype">int</span> fe_process_utt(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe,  
<a name="l00468"></a>00468                    int16 <span class="keyword">const</span> *spch, 
<a name="l00469"></a>00469                    <span class="keywordtype">size_t</span> nsamps, 
<a name="l00470"></a>00470                    mfcc_t ***cep_block, 
<a name="l00471"></a>00471                    int32 *nframes 
<a name="l00472"></a>00472         );
<a name="l00473"></a>00473 
<a name="l00477"></a>00477 SPHINXBASE_EXPORT
<a name="l00478"></a>00478 <span class="keywordtype">void</span> fe_free_2d(<span class="keywordtype">void</span> *arr);
<a name="l00479"></a>00479 
<a name="l00483"></a>00483 SPHINXBASE_EXPORT
<a name="l00484"></a>00484 <span class="keywordtype">int</span> fe_mfcc_to_float(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe,
<a name="l00485"></a>00485                      mfcc_t **input,
<a name="l00486"></a>00486                      float32 **output,
<a name="l00487"></a>00487                      int32 nframes);
<a name="l00488"></a>00488 
<a name="l00492"></a>00492 SPHINXBASE_EXPORT
<a name="l00493"></a>00493 <span class="keywordtype">int</span> fe_float_to_mfcc(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe,
<a name="l00494"></a>00494                      float32 **input,
<a name="l00495"></a>00495                      mfcc_t **output,
<a name="l00496"></a>00496                      int32 nframes);
<a name="l00497"></a>00497 
<a name="l00521"></a>00521 SPHINXBASE_EXPORT
<a name="l00522"></a>00522 <span class="keywordtype">int</span> fe_logspec_to_mfcc(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe,  
<a name="l00523"></a>00523                        <span class="keyword">const</span> mfcc_t *fr_spec, 
<a name="l00524"></a>00524                        mfcc_t *fr_cep 
<a name="l00525"></a>00525         );
<a name="l00526"></a>00526 
<a name="l00535"></a>00535 SPHINXBASE_EXPORT
<a name="l00536"></a>00536 <span class="keywordtype">int</span> fe_logspec_dct2(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe,  
<a name="l00537"></a>00537                     <span class="keyword">const</span> mfcc_t *fr_spec, 
<a name="l00538"></a>00538                     mfcc_t *fr_cep 
<a name="l00539"></a>00539         );
<a name="l00540"></a>00540 
<a name="l00549"></a>00549 SPHINXBASE_EXPORT
<a name="l00550"></a>00550 <span class="keywordtype">int</span> fe_mfcc_dct3(<a class="code" href="structfe__s.html" title="Structure for the front-end computation.">fe_t</a> *fe,  
<a name="l00551"></a>00551                  <span class="keyword">const</span> mfcc_t *fr_cep, 
<a name="l00552"></a>00552                  mfcc_t *fr_spec 
<a name="l00553"></a>00553         );
<a name="l00554"></a>00554 
<a name="l00555"></a>00555 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00556"></a>00556 <span class="preprocessor"></span>}
<a name="l00557"></a>00557 <span class="preprocessor">#endif</span>
<a name="l00558"></a>00558 <span class="preprocessor"></span>
<a name="l00559"></a>00559 
<a name="l00560"></a>00560 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>fe.h</b>      </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>