<!--#set var="isip_enrgydow_title" value="ISIP Software Documentation" -->
<?php include("/data/isip/www/templates/documentation/header/header.html"); ?>

<!--#set var="isip_page_title" value="SpeechRecognizer" -->
<?php include("/data/isip/www/templates/documentation/body/index_class.html"); ?>
<?php include("/data/isip/www/templates/documentation/body/bar.html"); ?>

<a name="name">
<b>
name:
<a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h">SpeechRecognizer</a>
</b>

<br><br>

<a name="synopsis">
<b>synopsis:</b>
<br><br>

<blockquote>
<pre>
g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_asr.a

#include &lt;SpeechRecognizer.h&gt;

SpeechRecognizer();
boolean setParam(const Filename& arg);
boolean setVerify(boolean verify);
boolean run(Sdb& sdb);
</pre>
</blockquote>

<a name="quick_start">
<b>quick start:</b>
<br><br>

<blockquote>
<pre>
SpeechRecognizer sr;
sr.setParam(L"diagnose_params.sof");
Sdb raw_list_sdb;
boolean is_list = true;
raw_list_sdb.append(L"diagnose_mfcc_list.sof", is_list);
sr.run(sdb);
</pre>
</blockquote>

<a name="description"> 
<b>description:</b>
<br><br>

The SpeechRecognizer is used to implement HMM based speech recognition system.

<br><br>

<a name="dependencies">
<b>dependencies:</b>
<br><br>

<ul>
  <li> <a href="../../pr/HiddenMarkovModel/index.html">HiddenMarkovModel</a>
</ul>

<a name="constants">
<b>public constants:</b>
<br><br>

<ul>
  <li> define the class name:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/sr_00.cc&constant=CLASS_NAME">static const String CLASS_NAME = L"SpeechRecognizer";</a></pre>
       
  <li> define the algorithm choices:

       <pre> enum ALGORITHM { HMM = 0, BN, NN, DEF_ALGORITHM = HMM };</pre>
</ul>

<a name="error">
<b>error codes:</b>
<br><br>

<ul>
  <li> error code indicating SpeechRecognizer class general error:

       <pre><a href="/perl/ifc_document.pl?err=00110000">static const long ERR = 110000;</a></pre>
</ul>

<a name="protected">
<b>protected data:</b>
<br><br>

<ul>
  <li> algorithm name:
       
       <pre>ALGORITHM algorithm_d;</pre>

  <li> verification mode flag:
       
       <pre>boolean verify_d;</pre>
       
  <li> parameter file:

       <pre>Filename param_file_name_d;</pre>

  <li> hidden Markov model object:
       
       <pre>HiddenMarkovModel hmm_d;</pre>

  <li> debug level:
       
       <pre>static Integral::DEBUG debug_level_d;</pre>

  <li> verbosity:
       
       <pre>static Integral::DEBUG verbosity_d;</pre>
       
  <li> static memory manager:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/sr_00.cc&static=mgr_d">static MemoryManager mgr_d;</a></pre>
</ul>

<a name="public">
<b>required public methods:</b>
<br><br>

<ul>
  <li> static methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=name">static const String& name();</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/sr_02.cc&method=diagnose">static boolean diagnose(Integral::DEBUG debug_level);</a></pre>

  <li> debug methods:

       <pre><pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setDebug">boolean setDebug(Integral::DEBUG debug_level);</a></pre>

  <li> destructor/constructor(s):
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/sr_00.cc&method=destructor">~SpeechRecognizer();</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/sr_00.cc&method=default+constructor">SpeechRecognizer();</a></pre>

</ul>

<a name="specific">
<b>class-specific public methods:</b>
<br><br>

<ul>
  <li> set methods:

  <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setStream">boolean setStream(boolean stream);</a></pre>
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setAlgorithm">boolean setAlgorithm(ALGORITHM algorithm);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/sr_06.cc&method=setParam">boolean setParam(String param_file_name);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setVerbosity">boolean setVerbosity(Integral::DEBUG verbosity);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setVerify">boolean setVerify(boolean verify);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setLanguageModelFile">boolean setLanguageModelFile(String& lm_file);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setLanguageModelUpdateFile">boolean setLanguageModelUpdateFile(String& lm_file);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method="setStatisticalModelPoolFile>boolean setStatisticalModelPoolFile(String& ac_file);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setStatisticalModelPoolUpdateFile">boolean setStatisticalModelPoolUpdateFile(String& ac_file);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setFunctionMode">boolean setFunctionMode(String& function_mode);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setOutputMode">boolean setOutputMode(String& output_mode);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setOutputFormat">boolean setOutputFormat(String& output_format);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setAccumulatorFile">boolean setAccumulatorFile(Filename& accum_file);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setAccumulatorList">boolean setAccumulatorList(Filename& accum_list);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setOutputFile">boolean setOutputFile(Filename& output_file);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setSplitThreshold">boolean setSplitThreshold(const String& split_threshold);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setMergeThreshold">boolean setMergeThreshold(const String& merge_threshold);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setNumOccThreshold">boolean setNumOccThreshold(const String& num_occ_threshold);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setDecisionTreeFile">boolean setDecisionTreeFile(const Filename& arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setQuesAnswerFile">boolean setQuesAnswerFile(const Filename& arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setOutputList">boolean setOutputList(Filename& output_list);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setOutputLevelString">boolean setOutputLevelString(String& output_level);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setUpdateLevelString">boolean setUpdateLevelString(String& update_level);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setAccumulatorPath">boolean setAccumulatorPath(Filename& accumulator_path);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=setAccumulatorName">boolean setAccumulatorName(String& accumulator_name);</a></pre>

  <li> get methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/SpeechRecognizer.h&method=getAlgorithm">ALGORITHM getAlgorithm() const;</a></pre>

  <li> computational methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/asr/SpeechRecognizer/sr_05.cc&method=run">boolean run(Sdb& sdb);</a></pre>
</ul>

<a name="private">
<b>private methods:</b>
<br><br>

<ul>       
  <li> none
</ul>
       
<a name="examples">
<b>examples:</b>
<br><br>

<ul>
  <li> This example shows how to set up and run the speech recognizer

<pre>
// declare a speech recognizer object
//
SpeechRecognizer sr;

// set up the speech recognizer parameters
//
sr.setParam(L"<a href="/perl/ifc_document.pl?file=$isip/class/pr/HiddenMarkovModel/diagnose_params.sof">params.sof</a>");

// setup the input speech file list
//      
Sdb raw_list_sdb;
boolean is_list = true;
raw_list_sdb.append(L"<a href="/perl/ifc_document.pl?file=$isip/class/pr/HiddenMarkovModel/diagnose_raw_list.sof">test_list.sof</a>", is_list);

// run the speech recognizer on the input speech file list
//
sr.run(raw_list_sdb);
</pre>
</ul>

<a name="notes">
<b>notes:</b>
<br><br>

<ul>
  <li> none
</ul>

<!--#include virtual="/hse/ies/templates/documentation/footer/footer.html" -->
