Sophie

Sophie

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

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/yin.h File Reference</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('yin_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<h1>include/sphinxbase/yin.h File Reference</h1>  </div>
</div>
<div class="contents">

<p>Implementation of pitch estimation.  
<a href="#_details">More...</a></p>
<div class="textblock"><code>#include &lt;sphinxbase/sphinxbase_export.h&gt;</code><br/>
<code>#include &lt;sphinxbase/prim_type.h&gt;</code><br/>
</div>
<p><a href="yin_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a69a22f00f601c099b232e01b94704c2c"></a><!-- doxytag: member="yin.h::yin_t" ref="a69a22f00f601c099b232e01b94704c2c" args="" -->
typedef struct <a class="el" href="structyin__s.html">yin_s</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yin_8h.html#a69a22f00f601c099b232e01b94704c2c">yin_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Frame-based moving-window pitch estimator. <br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc3a955f8d2215ed3d660737643c4f32"></a><!-- doxytag: member="yin.h::yin_init" ref="afc3a955f8d2215ed3d660737643c4f32" args="(int frame_size, float search_threshold, float search_range, int smooth_window)" -->
SPHINXBASE_EXPORT <a class="el" href="structyin__s.html">yin_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yin_8h.html#afc3a955f8d2215ed3d660737643c4f32">yin_init</a> (int frame_size, float search_threshold, float search_range, int smooth_window)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize moving-window pitch estimation. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae587e0d984966c482f21ee4cb0952dd0"></a><!-- doxytag: member="yin.h::yin_free" ref="ae587e0d984966c482f21ee4cb0952dd0" args="(yin_t *pe)" -->
SPHINXBASE_EXPORT void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yin_8h.html#ae587e0d984966c482f21ee4cb0952dd0">yin_free</a> (<a class="el" href="structyin__s.html">yin_t</a> *pe)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a moving-window pitch estimator. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a93d7c0fd3eb97d8ea735a76683ff4d"></a><!-- doxytag: member="yin.h::yin_start" ref="a9a93d7c0fd3eb97d8ea735a76683ff4d" args="(yin_t *pe)" -->
SPHINXBASE_EXPORT void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yin_8h.html#a9a93d7c0fd3eb97d8ea735a76683ff4d">yin_start</a> (<a class="el" href="structyin__s.html">yin_t</a> *pe)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Start processing an utterance. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9182cabf44e517c2db3b67edacebece9"></a><!-- doxytag: member="yin.h::yin_end" ref="a9182cabf44e517c2db3b67edacebece9" args="(yin_t *pe)" -->
SPHINXBASE_EXPORT void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yin_8h.html#a9182cabf44e517c2db3b67edacebece9">yin_end</a> (<a class="el" href="structyin__s.html">yin_t</a> *pe)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Mark the end of an utterance. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SPHINXBASE_EXPORT void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yin_8h.html#ac316a9b80593ad996df71b0f6df54d6c">yin_write</a> (<a class="el" href="structyin__s.html">yin_t</a> *pe, int16 const *frame)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Feed a frame of data to the pitch estimator.  <a href="#ac316a9b80593ad996df71b0f6df54d6c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SPHINXBASE_EXPORT int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yin_8h.html#a3a0ae5d5a543b9e71b34c9b4a285bdbf">yin_read</a> (<a class="el" href="structyin__s.html">yin_t</a> *pe, uint16 *out_period, uint16 *out_bestdiff)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Read a raw estimated pitch value from the pitch estimator.  <a href="#a3a0ae5d5a543b9e71b34c9b4a285bdbf"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Implementation of pitch estimation. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Huggins-Daines &lt;<a href="mailto:dhuggins@cs.cmu.edu">dhuggins@cs.cmu.edu</a>&gt;</dd></dl>
<p>This implements part of the YIN algorithm:</p>
<p>"YIN, a fundamental frequency estimator for speech and music". Alain de Cheveigné and Hideki Kawahara. Journal of the Acoustical Society of America, 111 (4), April 2002. </p>

<p>Definition in file <a class="el" href="yin_8h_source.html">yin.h</a>.</p>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="a3a0ae5d5a543b9e71b34c9b4a285bdbf"></a><!-- doxytag: member="yin.h::yin_read" ref="a3a0ae5d5a543b9e71b34c9b4a285bdbf" args="(yin_t *pe, uint16 *out_period, uint16 *out_bestdiff)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SPHINXBASE_EXPORT int yin_read </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structyin__s.html">yin_t</a> *&#160;</td>
          <td class="paramname"><em>pe</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16 *&#160;</td>
          <td class="paramname"><em>out_period</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16 *&#160;</td>
          <td class="paramname"><em>out_bestdiff</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read a raw estimated pitch value from the pitch estimator. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pe</td><td>Pitch estimator. </td></tr>
    <tr><td class="paramname">out_period</td><td>Output: an estimate of the period (*not* the pitch) of the signal in samples. </td></tr>
    <tr><td class="paramname">out_bestdiff</td><td>Output: the minimum normalized difference value associated with <code>*out_pitch</code>, in Q15 format (i.e. scaled by 32768). This can be interpreted as one minus the probability of voicing. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Non-zero if enough data was avaliable to return a pitch estimate, zero otherwise. </dd></dl>

<p>Definition at line <a class="el" href="yin_8c_source.html#l00221">221</a> of file <a class="el" href="yin_8c_source.html">yin.c</a>.</p>

<p>References <a class="el" href="yin_8c_source.html#l00061">yin_s::diff_window</a>, <a class="el" href="yin_8c_source.html#l00059">yin_s::endut</a>, <a class="el" href="yin_8c_source.html#l00054">yin_s::nfr</a>, <a class="el" href="yin_8c_source.html#l00062">yin_s::period_window</a>, <a class="el" href="yin_8c_source.html#l00053">yin_s::search_range</a>, <a class="el" href="yin_8c_source.html#l00052">yin_s::search_threshold</a>, <a class="el" href="yin_8c_source.html#l00058">yin_s::wcur</a>, <a class="el" href="yin_8c_source.html#l00056">yin_s::wsize</a>, and <a class="el" href="yin_8c_source.html#l00057">yin_s::wstart</a>.</p>

</div>
</div>
<a class="anchor" id="ac316a9b80593ad996df71b0f6df54d6c"></a><!-- doxytag: member="yin.h::yin_write" ref="ac316a9b80593ad996df71b0f6df54d6c" args="(yin_t *pe, int16 const *frame)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SPHINXBASE_EXPORT void yin_write </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structyin__s.html">yin_t</a> *&#160;</td>
          <td class="paramname"><em>pe</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16 const *&#160;</td>
          <td class="paramname"><em>frame</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Feed a frame of data to the pitch estimator. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pe</td><td>Pitch estimator. </td></tr>
    <tr><td class="paramname">frame</td><td>Frame of <code>frame_size</code> (see <a class="el" href="yin_8h.html#afc3a955f8d2215ed3d660737643c4f32" title="Initialize moving-window pitch estimation.">yin_init()</a>) samples of audio data. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="yin_8c_source.html#l00194">194</a> of file <a class="el" href="yin_8c_source.html">yin.c</a>.</p>

<p>References <a class="el" href="yin_8c_source.html#l00061">yin_s::diff_window</a>, <a class="el" href="yin_8c_source.html#l00054">yin_s::nfr</a>, <a class="el" href="yin_8c_source.html#l00062">yin_s::period_window</a>, <a class="el" href="yin_8c_source.html#l00052">yin_s::search_threshold</a>, <a class="el" href="yin_8c_source.html#l00056">yin_s::wsize</a>, and <a class="el" href="yin_8c_source.html#l00057">yin_s::wstart</a>.</p>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="yin_8h.html">yin.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>