Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 56b1fde4ed0e5f3d153fe0391e13cdf1 > files > 16

pocketsphinx-devel-0.7-1.fc14.x86_64.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>PocketSphinx: src/libpocketsphinx/acmod.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">PocketSphinx&#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="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('acmod_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<h1>src/libpocketsphinx/acmod.h</h1>  </div>
</div>
<div class="contents">
<a href="acmod_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) 2008 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="l00043"></a>00043 <span class="preprocessor">#ifndef __ACMOD_H__</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#define __ACMOD_H__</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span>
<a name="l00046"></a>00046 <span class="comment">/* System headers. */</span>
<a name="l00047"></a>00047 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00048"></a>00048 
<a name="l00049"></a>00049 <span class="comment">/* SphinxBase headers. */</span>
<a name="l00050"></a>00050 <span class="preprocessor">#include &lt;sphinxbase/cmd_ln.h&gt;</span>
<a name="l00051"></a>00051 <span class="preprocessor">#include &lt;sphinxbase/logmath.h&gt;</span>
<a name="l00052"></a>00052 <span class="preprocessor">#include &lt;sphinxbase/fe.h&gt;</span>
<a name="l00053"></a>00053 <span class="preprocessor">#include &lt;sphinxbase/feat.h&gt;</span>
<a name="l00054"></a>00054 <span class="preprocessor">#include &lt;sphinxbase/bitvec.h&gt;</span>
<a name="l00055"></a>00055 <span class="preprocessor">#include &lt;sphinxbase/err.h&gt;</span>
<a name="l00056"></a>00056 
<a name="l00057"></a>00057 <span class="comment">/* Local headers. */</span>
<a name="l00058"></a>00058 <span class="preprocessor">#include &quot;ps_mllr.h&quot;</span>
<a name="l00059"></a>00059 <span class="preprocessor">#include &quot;<a class="code" href="bin__mdef_8h.html" title="Binary format model definition files, with support for heterogeneous topologies and variable-size N-p...">bin_mdef.h</a>&quot;</span>
<a name="l00060"></a>00060 <span class="preprocessor">#include &quot;<a class="code" href="tmat_8h.html" title="Transition matrix data structure.">tmat.h</a>&quot;</span>
<a name="l00061"></a>00061 <span class="preprocessor">#include &quot;<a class="code" href="hmm_8h.html" title="Implementation of HMM base structure.">hmm.h</a>&quot;</span>
<a name="l00062"></a>00062 
<a name="l00066"></a><a class="code" href="acmod_8h.html#a6a74b084234e0e7d5e72161545c5040b">00066</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="acmod_8h.html#a6a74b084234e0e7d5e72161545c5040b" title="States in utterance processing.">acmod_state_e</a> {
<a name="l00067"></a><a class="code" href="acmod_8h.html#a6a74b084234e0e7d5e72161545c5040ba09f7964816ae844c445acd4cf3e33253">00067</a>     <a class="code" href="acmod_8h.html#a6a74b084234e0e7d5e72161545c5040ba09f7964816ae844c445acd4cf3e33253" title="Not in an utterance.">ACMOD_IDLE</a>,         
<a name="l00068"></a><a class="code" href="acmod_8h.html#a6a74b084234e0e7d5e72161545c5040ba71f39dbe81403dbb045f4312d1bbaae3">00068</a>     <a class="code" href="acmod_8h.html#a6a74b084234e0e7d5e72161545c5040ba71f39dbe81403dbb045f4312d1bbaae3" title="Utterance started, no data yet.">ACMOD_STARTED</a>,      
<a name="l00069"></a><a class="code" href="acmod_8h.html#a6a74b084234e0e7d5e72161545c5040ba1ed8df720ee7006ebaada8c75371d94c">00069</a>     <a class="code" href="acmod_8h.html#a6a74b084234e0e7d5e72161545c5040ba1ed8df720ee7006ebaada8c75371d94c" title="Utterance in progress.">ACMOD_PROCESSING</a>,   
<a name="l00070"></a><a class="code" href="acmod_8h.html#a6a74b084234e0e7d5e72161545c5040ba3d936d27ce644db26a862830f3b6d188">00070</a>     <a class="code" href="acmod_8h.html#a6a74b084234e0e7d5e72161545c5040ba3d936d27ce644db26a862830f3b6d188" title="Utterance ended, still buffering.">ACMOD_ENDED</a>         
<a name="l00071"></a>00071 } <a class="code" href="acmod_8h.html#a702be741f97505cdddf04a4448ab1ac1" title="States in utterance processing.">acmod_state_t</a>;
<a name="l00072"></a>00072 
<a name="l00076"></a><a class="code" href="acmod_8h.html#ace94548e8c9429394d130e2f9921d59b">00076</a> <span class="preprocessor">#define SENSCR_DUMMY 0x7fff</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span>
<a name="l00081"></a><a class="code" href="structps__mllr__s.html">00081</a> <span class="keyword">struct </span><a class="code" href="structps__mllr__s.html" title="Feature space linear transform structure.">ps_mllr_s</a> {
<a name="l00082"></a><a class="code" href="structps__mllr__s.html#ac138bd81a40d8569d795463ea1ec52bd">00082</a>     <span class="keywordtype">int</span> <a class="code" href="structps__mllr__s.html#ac138bd81a40d8569d795463ea1ec52bd" title="Reference count.">refcnt</a>;     
<a name="l00083"></a><a class="code" href="structps__mllr__s.html#a30b9bb76c5469542d531ead4ad1bdcb1">00083</a>     <span class="keywordtype">int</span> <a class="code" href="structps__mllr__s.html#a30b9bb76c5469542d531ead4ad1bdcb1" title="Number of MLLR classes.">n_class</a>;    
<a name="l00084"></a><a class="code" href="structps__mllr__s.html#acc9e853a333f4e79b24f3e5af0946e43">00084</a>     <span class="keywordtype">int</span> <a class="code" href="structps__mllr__s.html#acc9e853a333f4e79b24f3e5af0946e43" title="Number of feature streams.">n_feat</a>;     
<a name="l00085"></a><a class="code" href="structps__mllr__s.html#a20fae2fc119069371464a6502e00c0e4">00085</a>     <span class="keywordtype">int</span> *<a class="code" href="structps__mllr__s.html#a20fae2fc119069371464a6502e00c0e4" title="Length of input vectors for each stream.">veclen</a>;    
<a name="l00086"></a><a class="code" href="structps__mllr__s.html#a4cfa5d4c6637282b947b525a673cc3d0">00086</a>     float32 ****<a class="code" href="structps__mllr__s.html#a4cfa5d4c6637282b947b525a673cc3d0" title="Rotation part of mean transformations.">A</a>;  
<a name="l00087"></a><a class="code" href="structps__mllr__s.html#a65430ba654d0af5e508715de24077f2d">00087</a>     float32 ***<a class="code" href="structps__mllr__s.html#a65430ba654d0af5e508715de24077f2d" title="Bias part of mean transformations.">b</a>;   
<a name="l00088"></a><a class="code" href="structps__mllr__s.html#ae92b910e17202389aca99ee5105085b0">00088</a>     float32 ***<a class="code" href="structps__mllr__s.html#ae92b910e17202389aca99ee5105085b0" title="Diagonal transformation of variances.">h</a>;   
<a name="l00089"></a><a class="code" href="structps__mllr__s.html#a745c4b69be55cef8629abab02f474bb9">00089</a>     int32 *<a class="code" href="structps__mllr__s.html#a745c4b69be55cef8629abab02f474bb9" title="Mapping from codebooks to transformations.">cb2mllr</a>; 
<a name="l00090"></a>00090 };
<a name="l00091"></a>00091 
<a name="l00095"></a><a class="code" href="acmod_8h.html#ab7a75abad7044b2ab494823d2ae8bbd4">00095</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structps__mgau__s.html">ps_mgau_s</a> <a class="code" href="structps__mgau__s.html">ps_mgau_t</a>;
<a name="l00096"></a>00096 
<a name="l00097"></a><a class="code" href="structps__mgaufuncs__s.html">00097</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structps__mgaufuncs__s.html">ps_mgaufuncs_s</a> {
<a name="l00098"></a>00098     <span class="keywordtype">char</span> <span class="keyword">const</span> *name;
<a name="l00099"></a>00099 
<a name="l00100"></a>00100     int (*frame_eval)(<a class="code" href="structps__mgau__s.html">ps_mgau_t</a> *mgau,
<a name="l00101"></a>00101                       int16 *senscr,
<a name="l00102"></a>00102                       uint8 *senone_active,
<a name="l00103"></a>00103                       int32 n_senone_active,
<a name="l00104"></a>00104                       mfcc_t ** feat,
<a name="l00105"></a>00105                       int32 frame,
<a name="l00106"></a>00106                       int32 compallsen);
<a name="l00107"></a>00107     int (*transform)(<a class="code" href="structps__mgau__s.html">ps_mgau_t</a> *mgau,
<a name="l00108"></a>00108                      <a class="code" href="structps__mllr__s.html" title="Feature space linear transform structure.">ps_mllr_t</a> *mllr);
<a name="l00109"></a>00109     void (*free)(<a class="code" href="structps__mgau__s.html">ps_mgau_t</a> *mgau);
<a name="l00110"></a>00110 } <a class="code" href="structps__mgaufuncs__s.html">ps_mgaufuncs_t</a>;    
<a name="l00111"></a>00111 
<a name="l00112"></a><a class="code" href="structps__mgau__s.html">00112</a> <span class="keyword">struct </span><a class="code" href="structps__mgau__s.html">ps_mgau_s</a> {
<a name="l00113"></a><a class="code" href="structps__mgau__s.html#a931f7cbf334b8ed50b0e1c2803a10c67">00113</a>     <a class="code" href="structps__mgaufuncs__s.html">ps_mgaufuncs_t</a> *<a class="code" href="structps__mgau__s.html#a931f7cbf334b8ed50b0e1c2803a10c67" title="vtable of mgau functions.">vt</a>;  
<a name="l00114"></a><a class="code" href="structps__mgau__s.html#a19cc836a740e32d0fa88c46fcdc19d75">00114</a>     <span class="keywordtype">int</span> <a class="code" href="structps__mgau__s.html#a19cc836a740e32d0fa88c46fcdc19d75" title="frame counter.">frame_idx</a>;       
<a name="l00115"></a>00115 };
<a name="l00116"></a>00116 
<a name="l00117"></a>00117 <span class="preprocessor">#define ps_mgau_base(mg) ((ps_mgau_t *)(mg))</span>
<a name="l00118"></a>00118 <span class="preprocessor"></span><span class="preprocessor">#define ps_mgau_frame_eval(mg,senscr,senone_active,n_senone_active,feat,frame,compallsen) \</span>
<a name="l00119"></a>00119 <span class="preprocessor">    (*ps_mgau_base(mg)-&gt;vt-&gt;frame_eval)                                 \</span>
<a name="l00120"></a>00120 <span class="preprocessor">    (mg, senscr, senone_active, n_senone_active, feat, frame, compallsen)</span>
<a name="l00121"></a>00121 <span class="preprocessor"></span><span class="preprocessor">#define ps_mgau_transform(mg, mllr)                                  \</span>
<a name="l00122"></a>00122 <span class="preprocessor">    (*ps_mgau_base(mg)-&gt;vt-&gt;transform)(mg, mllr)</span>
<a name="l00123"></a>00123 <span class="preprocessor"></span><span class="preprocessor">#define ps_mgau_free(mg)                                  \</span>
<a name="l00124"></a>00124 <span class="preprocessor">    (*ps_mgau_base(mg)-&gt;vt-&gt;free)(mg)</span>
<a name="l00125"></a>00125 <span class="preprocessor"></span>
<a name="l00147"></a><a class="code" href="structacmod__s.html">00147</a> <span class="keyword">struct </span><a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_s</a> {
<a name="l00148"></a>00148     <span class="comment">/* Global objects, not retained. */</span>
<a name="l00149"></a><a class="code" href="structacmod__s.html#a3563f4d0bdc48d3ee140b9e28806279d">00149</a>     cmd_ln_t *<a class="code" href="structacmod__s.html#a3563f4d0bdc48d3ee140b9e28806279d" title="Configuration.">config</a>;          
<a name="l00150"></a><a class="code" href="structacmod__s.html#a9de7e8ac9c0c4df3d2a9ad5406787f3c">00150</a>     logmath_t *<a class="code" href="structacmod__s.html#a9de7e8ac9c0c4df3d2a9ad5406787f3c" title="Log-math computation.">lmath</a>;          
<a name="l00151"></a><a class="code" href="structacmod__s.html#a9f6b699a0fbd43cf7ababab6f0ab81be">00151</a>     glist_t <a class="code" href="structacmod__s.html#a9f6b699a0fbd43cf7ababab6f0ab81be" title="Temporary acoustic model filenames.">strings</a>;           
<a name="l00153"></a>00153     <span class="comment">/* Feature computation: */</span>
<a name="l00154"></a><a class="code" href="structacmod__s.html#a56eaceb9b6a1cbcccd09cf42cfa87231">00154</a>     fe_t *<a class="code" href="structacmod__s.html#a56eaceb9b6a1cbcccd09cf42cfa87231" title="Acoustic feature computation.">fe</a>;                  
<a name="l00155"></a><a class="code" href="structacmod__s.html#a37ec6c2b1f3ada764842e08481239b34">00155</a>     feat_t *<a class="code" href="structacmod__s.html#a37ec6c2b1f3ada764842e08481239b34" title="Dynamic feature computation.">fcb</a>;               
<a name="l00157"></a>00157     <span class="comment">/* Model parameters: */</span>
<a name="l00158"></a><a class="code" href="structacmod__s.html#a351548ff5547c29b4a684e10434a51dd">00158</a>     <a class="code" href="structbin__mdef__s.html">bin_mdef_t</a> *<a class="code" href="structacmod__s.html#a351548ff5547c29b4a684e10434a51dd" title="Model definition.">mdef</a>;          
<a name="l00159"></a><a class="code" href="structacmod__s.html#aaa3982184a49f0d61e397ba89f486259">00159</a>     <a class="code" href="structtmat__t.html" title="Transition matrix data structure.">tmat_t</a> *<a class="code" href="structacmod__s.html#aaa3982184a49f0d61e397ba89f486259" title="Transition matrices.">tmat</a>;              
<a name="l00160"></a><a class="code" href="structacmod__s.html#a023addd9fe7252d87c683e02485cdafd">00160</a>     <a class="code" href="structps__mgau__s.html">ps_mgau_t</a> *<a class="code" href="structacmod__s.html#a023addd9fe7252d87c683e02485cdafd" title="Model parameters.">mgau</a>;           
<a name="l00161"></a><a class="code" href="structacmod__s.html#a4edbfa1a1324c6db27b74de7d0158e5e">00161</a>     <a class="code" href="structps__mllr__s.html" title="Feature space linear transform structure.">ps_mllr_t</a> *<a class="code" href="structacmod__s.html#a4edbfa1a1324c6db27b74de7d0158e5e" title="Speaker transformation.">mllr</a>;           
<a name="l00163"></a>00163     <span class="comment">/* Senone scoring: */</span>
<a name="l00164"></a><a class="code" href="structacmod__s.html#aa341539b98a5b13bef8589fc8d948da8">00164</a>     int16 *<a class="code" href="structacmod__s.html#aa341539b98a5b13bef8589fc8d948da8" title="GMM scores for current frame.">senone_scores</a>;      
<a name="l00165"></a><a class="code" href="structacmod__s.html#a4a3ad3a3dc9a7b36c024c77729012e55">00165</a>     bitvec_t *<a class="code" href="structacmod__s.html#a4a3ad3a3dc9a7b36c024c77729012e55" title="Active GMMs in current frame.">senone_active_vec</a>; 
<a name="l00166"></a><a class="code" href="structacmod__s.html#a5c98c727daf4e6bb23534e00b30cb5c2">00166</a>     uint8 *<a class="code" href="structacmod__s.html#a5c98c727daf4e6bb23534e00b30cb5c2" title="Array of deltas to active GMMs.">senone_active</a>;      
<a name="l00167"></a><a class="code" href="structacmod__s.html#ab70ba4caf96b656936d499247e921f00">00167</a>     <span class="keywordtype">int</span> <a class="code" href="structacmod__s.html#ab70ba4caf96b656936d499247e921f00" title="Frame index for senone_scores.">senscr_frame</a>;          
<a name="l00168"></a><a class="code" href="structacmod__s.html#a5081a507e3ca6de6c5695217245dc9f9">00168</a>     <span class="keywordtype">int</span> <a class="code" href="structacmod__s.html#a5081a507e3ca6de6c5695217245dc9f9" title="Number of active GMMs.">n_senone_active</a>;       
<a name="l00169"></a><a class="code" href="structacmod__s.html#a95d5195647b6395d95433d45e3f74d51">00169</a>     <span class="keywordtype">int</span> <a class="code" href="structacmod__s.html#a95d5195647b6395d95433d45e3f74d51" title="Zero log-probability value.">log_zero</a>;              
<a name="l00171"></a>00171     <span class="comment">/* Utterance processing: */</span>
<a name="l00172"></a><a class="code" href="structacmod__s.html#a5ded3dce0428a6ecba97b5d3486e7fa9">00172</a>     mfcc_t **<a class="code" href="structacmod__s.html#a5ded3dce0428a6ecba97b5d3486e7fa9" title="Temporary buffer of acoustic features.">mfc_buf</a>;   
<a name="l00173"></a><a class="code" href="structacmod__s.html#afc52cc0151f6c7e32a230576141d20a3">00173</a>     mfcc_t ***<a class="code" href="structacmod__s.html#afc52cc0151f6c7e32a230576141d20a3" title="Temporary buffer of dynamic features.">feat_buf</a>; 
<a name="l00174"></a><a class="code" href="structacmod__s.html#aeac89442a04744ca607c4c66dab053e8">00174</a>     FILE *<a class="code" href="structacmod__s.html#aeac89442a04744ca607c4c66dab053e8" title="File for writing raw audio data.">rawfh</a>;        
<a name="l00175"></a><a class="code" href="structacmod__s.html#a71903df6839f1f9fcfc2ef2a62a94f8e">00175</a>     FILE *<a class="code" href="structacmod__s.html#a71903df6839f1f9fcfc2ef2a62a94f8e" title="File for writing acoustic feature data.">mfcfh</a>;        
<a name="l00176"></a><a class="code" href="structacmod__s.html#aba97a9733b64074f3a4699dfbaed5ffd">00176</a>     FILE *<a class="code" href="structacmod__s.html#aba97a9733b64074f3a4699dfbaed5ffd" title="File for writing senone score data.">senfh</a>;        
<a name="l00177"></a><a class="code" href="structacmod__s.html#ad0998a9d887db82bd684e9454c9b044e">00177</a>     FILE *<a class="code" href="structacmod__s.html#ad0998a9d887db82bd684e9454c9b044e" title="Input senone score file.">insenfh</a>;      
<a name="l00178"></a><a class="code" href="structacmod__s.html#abfd364dafee513f523e1566bb706e48b">00178</a>     <span class="keywordtype">long</span> *<a class="code" href="structacmod__s.html#abfd364dafee513f523e1566bb706e48b" title="File positions of recent frames in senone file.">framepos</a>;     
<a name="l00180"></a>00180     <span class="comment">/* A whole bunch of flags and counters: */</span>
<a name="l00181"></a><a class="code" href="structacmod__s.html#a06adf606c11e6f4b9869742510a5c23b">00181</a>     uint8 <a class="code" href="structacmod__s.html#a06adf606c11e6f4b9869742510a5c23b" title="State of utterance processing.">state</a>;        
<a name="l00182"></a><a class="code" href="structacmod__s.html#ac08227365e3ed4354e26f013bc0df2bd">00182</a>     uint8 <a class="code" href="structacmod__s.html#ac08227365e3ed4354e26f013bc0df2bd" title="Compute all senones?">compallsen</a>;   
<a name="l00183"></a><a class="code" href="structacmod__s.html#acbb3fed9495e7b80da79cb03ff3079a1">00183</a>     uint8 <a class="code" href="structacmod__s.html#acbb3fed9495e7b80da79cb03ff3079a1" title="Whether to grow feat_buf.">grow_feat</a>;    
<a name="l00184"></a><a class="code" href="structacmod__s.html#ae6ed7e1e5b4bec021a0ba17c0ac02bd7">00184</a>     uint8 <a class="code" href="structacmod__s.html#ae6ed7e1e5b4bec021a0ba17c0ac02bd7" title="Whether to swap input senone score.">insen_swap</a>;   
<a name="l00185"></a><a class="code" href="structacmod__s.html#a00fe2b63f5618d433c33daea2dd54260">00185</a>     int16 <a class="code" href="structacmod__s.html#a00fe2b63f5618d433c33daea2dd54260" title="Index of next frame of dynamic features.">output_frame</a>; 
<a name="l00186"></a><a class="code" href="structacmod__s.html#a488c9a6f3c7f8b4f1c9914dfddde873d">00186</a>     int16 <a class="code" href="structacmod__s.html#a488c9a6f3c7f8b4f1c9914dfddde873d" title="Number of frames allocated in mfc_buf.">n_mfc_alloc</a>;  
<a name="l00187"></a><a class="code" href="structacmod__s.html#a16627c66683bd1a2308bbeb4498931a5">00187</a>     int16 <a class="code" href="structacmod__s.html#a16627c66683bd1a2308bbeb4498931a5" title="Number of frames active in mfc_buf.">n_mfc_frame</a>;  
<a name="l00188"></a><a class="code" href="structacmod__s.html#a1194a0739d3867c0facb84ae043bf5ec">00188</a>     int16 <a class="code" href="structacmod__s.html#a1194a0739d3867c0facb84ae043bf5ec" title="Start of active frames in mfc_buf.">mfc_outidx</a>;   
<a name="l00189"></a><a class="code" href="structacmod__s.html#a1aa262c670ac6d22e828b237cbe1901a">00189</a>     int16 <a class="code" href="structacmod__s.html#a1aa262c670ac6d22e828b237cbe1901a" title="Number of frames allocated in feat_buf.">n_feat_alloc</a>; 
<a name="l00190"></a><a class="code" href="structacmod__s.html#a815a68a4006e26c992f183b291137d10">00190</a>     int16 <a class="code" href="structacmod__s.html#a815a68a4006e26c992f183b291137d10" title="Number of frames active in feat_buf.">n_feat_frame</a>; 
<a name="l00191"></a><a class="code" href="structacmod__s.html#a590a737c15d712d36392b23dcb759f5e">00191</a>     int16 <a class="code" href="structacmod__s.html#a590a737c15d712d36392b23dcb759f5e" title="Start of active frames in feat_buf.">feat_outidx</a>;  
<a name="l00192"></a>00192 };
<a name="l00193"></a>00193 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_s</a> <a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a>;
<a name="l00194"></a>00194 
<a name="l00211"></a>00211 <a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *<a class="code" href="acmod_8c.html#a6f32b623cbc3d15a1e3c5d09aba7dabf" title="Initialize an acoustic model.">acmod_init</a>(cmd_ln_t *<a class="code" href="structacmod__s.html#a3563f4d0bdc48d3ee140b9e28806279d" title="Configuration.">config</a>, logmath_t *<a class="code" href="structacmod__s.html#a9de7e8ac9c0c4df3d2a9ad5406787f3c" title="Log-math computation.">lmath</a>, fe_t *<a class="code" href="structacmod__s.html#a56eaceb9b6a1cbcccd09cf42cfa87231" title="Acoustic feature computation.">fe</a>, feat_t *<a class="code" href="structacmod__s.html#a37ec6c2b1f3ada764842e08481239b34" title="Dynamic feature computation.">fcb</a>);
<a name="l00212"></a>00212 
<a name="l00224"></a>00224 <a class="code" href="structps__mllr__s.html" title="Feature space linear transform structure.">ps_mllr_t</a> *<a class="code" href="acmod_8c.html#a4205b92d38db562577eafc3c432593ab" title="Adapt acoustic model using a linear transform.">acmod_update_mllr</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod, <a class="code" href="structps__mllr__s.html" title="Feature space linear transform structure.">ps_mllr_t</a> *<a class="code" href="structacmod__s.html#a4edbfa1a1324c6db27b74de7d0158e5e" title="Speaker transformation.">mllr</a>);
<a name="l00225"></a>00225 
<a name="l00233"></a>00233 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#ab35cb48cdf326a3fb5223589d73ae0ce" title="Start logging senone scores to a filehandle.">acmod_set_senfh</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod, FILE *<a class="code" href="structacmod__s.html#aba97a9733b64074f3a4699dfbaed5ffd" title="File for writing senone score data.">senfh</a>);
<a name="l00234"></a>00234 
<a name="l00242"></a>00242 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#a5753caa516c75bdc74b385d7aa66a97c" title="Start logging MFCCs to a filehandle.">acmod_set_mfcfh</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod, FILE *logfh);
<a name="l00243"></a>00243 
<a name="l00251"></a>00251 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#a6979441ae866ea846ef41f8471b105a0" title="Start logging raw audio to a filehandle.">acmod_set_rawfh</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod, FILE *logfh);
<a name="l00252"></a>00252 
<a name="l00256"></a>00256 <span class="keywordtype">void</span> <a class="code" href="acmod_8c.html#a1e3345e8ef8b060fc04e88f86e6afa4a" title="Finalize an acoustic model.">acmod_free</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod);
<a name="l00257"></a>00257 
<a name="l00261"></a>00261 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#aa3a5a89f76338e3e1bcfa7a2cecc5845" title="Mark the start of an utterance.">acmod_start_utt</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod);
<a name="l00262"></a>00262 
<a name="l00266"></a>00266 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#a262372bdd6063f61e64b5417a449c1a9" title="Mark the end of an utterance.">acmod_end_utt</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod);
<a name="l00267"></a>00267 
<a name="l00280"></a>00280 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#a7b5f0b6edac2985b9b56d630cd705b99" title="Rewind the current utterance, allowing it to be rescored.">acmod_rewind</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod);
<a name="l00281"></a>00281 
<a name="l00291"></a>00291 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#a338971ea0aa27fb4796d224e4767642b" title="Advance the frame index.">acmod_advance</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod);
<a name="l00292"></a>00292 
<a name="l00301"></a>00301 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#a1555dac8fa27f644d709c5c89bbfa881" title="Set memory allocation policy for utterance processing.">acmod_set_grow</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod, <span class="keywordtype">int</span> <a class="code" href="structacmod__s.html#acbb3fed9495e7b80da79cb03ff3079a1" title="Whether to grow feat_buf.">grow_feat</a>);
<a name="l00302"></a>00302 
<a name="l00321"></a>00321 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#a23e63c8833e6128ae248e183d42f9b2b" title="TODO: Set queue length for utterance processing.">acmod_process_raw</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod,
<a name="l00322"></a>00322                       int16 <span class="keyword">const</span> **inout_raw,
<a name="l00323"></a>00323                       <span class="keywordtype">size_t</span> *inout_n_samps,
<a name="l00324"></a>00324                       <span class="keywordtype">int</span> full_utt);
<a name="l00325"></a>00325 
<a name="l00337"></a>00337 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#a9464f7708a361171469d613d401619fe" title="Feed acoustic feature data into the acoustic model for scoring.">acmod_process_cep</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod,
<a name="l00338"></a>00338                       mfcc_t ***inout_cep,
<a name="l00339"></a>00339                       <span class="keywordtype">int</span> *inout_n_frames,
<a name="l00340"></a>00340                       <span class="keywordtype">int</span> full_utt);
<a name="l00341"></a>00341 
<a name="l00355"></a>00355 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#ab16e414d5a07519d7b462c32377e8a47" title="Feed dynamic feature data into the acoustic model for scoring.">acmod_process_feat</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod,
<a name="l00356"></a>00356                        mfcc_t **feat);
<a name="l00357"></a>00357 
<a name="l00364"></a>00364 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#a58bd6038bec5d3901ac2057cacdd778a" title="Set up a senone score dump file for input.">acmod_set_insenfh</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod, FILE *<a class="code" href="structacmod__s.html#ad0998a9d887db82bd684e9454c9b044e" title="Input senone score file.">insenfh</a>);
<a name="l00365"></a>00365 
<a name="l00371"></a>00371 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#a5c193164be78ad42944b7fb1be6299a2" title="Read one frame of scores from senone score dump file.">acmod_read_scores</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod);
<a name="l00372"></a>00372 
<a name="l00382"></a>00382 mfcc_t **<a class="code" href="acmod_8c.html#a91c63cce3b20f231aa483bf054eca3c6" title="Get a frame of dynamic feature data.">acmod_get_frame</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod, <span class="keywordtype">int</span> *inout_frame_idx);
<a name="l00383"></a>00383 
<a name="l00397"></a>00397 int16 <span class="keyword">const</span> *<a class="code" href="acmod_8c.html#acd78e9bae06724df9c53f844d90c1c8a" title="Score one frame of data.">acmod_score</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod,
<a name="l00398"></a>00398                          <span class="keywordtype">int</span> *inout_frame_idx);
<a name="l00399"></a>00399 
<a name="l00403"></a>00403 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#ac561943e80e1478d7153d3c6320d57d9" title="Write senone dump file header.">acmod_write_senfh_header</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod, FILE *logfh);
<a name="l00404"></a>00404 
<a name="l00408"></a>00408 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#a66d1f73cd1d975ec0da9de00b80b36e2" title="Write a frame of senone scores to a dump file.">acmod_write_scores</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod, <span class="keywordtype">int</span> n_active, uint8 <span class="keyword">const</span> *active,
<a name="l00409"></a>00409                        int16 <span class="keyword">const</span> *senscr, FILE *<a class="code" href="structacmod__s.html#aba97a9733b64074f3a4699dfbaed5ffd" title="File for writing senone score data.">senfh</a>);
<a name="l00410"></a>00410 
<a name="l00411"></a>00411 
<a name="l00415"></a>00415 <span class="keywordtype">int</span> <a class="code" href="acmod_8c.html#a3249e1ce0c8155dc23f332f97ddd493b" title="Get best score and senone index for current frame.">acmod_best_score</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod, <span class="keywordtype">int</span> *out_best_senid);
<a name="l00416"></a>00416 
<a name="l00420"></a>00420 <span class="keywordtype">void</span> <a class="code" href="acmod_8c.html#aed43f033f434e34fd90c975909d81cb2" title="Clear set of active senones.">acmod_clear_active</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod);
<a name="l00421"></a>00421 
<a name="l00425"></a>00425 <span class="keywordtype">void</span> <a class="code" href="acmod_8c.html#a2a7f67d462279b2bc4774c7967ae61c7" title="Activate senones associated with an HMM.">acmod_activate_hmm</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod, <a class="code" href="structhmm__t.html" title="An individual HMM among the HMM search space.">hmm_t</a> *hmm);
<a name="l00426"></a>00426 
<a name="l00430"></a><a class="code" href="acmod_8h.html#a2ad4e2308e0e87230833466844bbccbc">00430</a> <span class="preprocessor">#define acmod_activate_sen(acmod, sen) bitvec_set((acmod)-&gt;senone_active_vec, sen)</span>
<a name="l00431"></a>00431 <span class="preprocessor"></span>
<a name="l00435"></a>00435 int32 <a class="code" href="acmod_8c.html#ad12224c741f7ea76faf88a29537f83dd" title="Build active list from.">acmod_flags2list</a>(<a class="code" href="structacmod__s.html" title="Acoustic model structure.">acmod_t</a> *acmod);
<a name="l00436"></a>00436 
<a name="l00437"></a>00437 <span class="preprocessor">#endif </span><span class="comment">/* __ACMOD_H__ */</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="acmod_8h.html">acmod.h</a>      </li>
      <li class="footer">Generated on Wed Apr 20 2011 for PocketSphinx 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>