<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>竹枝 &#187; HTK</title>
	<atom:link href="http://blog.anyshpm.com/tag/htk/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.anyshpm.com</link>
	<description>S &#38; H / M</description>
	<lastBuildDate>Wed, 21 Dec 2011 14:14:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://blog.anyshpm.com/?pushpress=hub'/>
		<item>
		<title>牛刀小试，建立“是”、“否”识别系统——学习《HTK (v.3.1): Basic Tutorial》</title>
		<link>http://blog.anyshpm.com/2010/03/10/yes-or-no-recognition-system-under-htk.html</link>
		<comments>http://blog.anyshpm.com/2010/03/10/yes-or-no-recognition-system-under-htk.html#comments</comments>
		<pubDate>Wed, 10 Mar 2010 14:15:43 +0000</pubDate>
		<dc:creator>anyshpm</dc:creator>
				<category><![CDATA[旅程]]></category>
		<category><![CDATA[HMM]]></category>
		<category><![CDATA[HTK]]></category>
		<category><![CDATA[毕业设计]]></category>
		<category><![CDATA[语音识别]]></category>

		<guid isPermaLink="false">http://blog.anyshpm.com/?p=781</guid>
		<description><![CDATA[看了《HTK (v.3.1): Basic Tutorial》，总结一下，参照了这篇文章。不懂得太多了，还得回去不信号与线性系统，这个毕设对于我来说还是很有挑战性的。 步骤： 1. 建立训练数据库 2. 声学（Acoustical）分析 3. 定义模型 4. 训练模型 5. 定义任务 6. 识别未知信号 7. 评价 过程 1. 建立训练资料 a. 录制音频 HSLab name.sig b. 标记信号 在HSLab中标记信号位置 2. 声学（Acoustical）分析 a. 配置参数（analysis.conf） # # Example of an acoustical analysis configuration file # SOURCEFORMAT = HTK # Gives the format of the speech files TARGETKIND [...]]]></description>
			<content:encoded><![CDATA[<p>看了《HTK (v.3.1): Basic Tutorial》，总结一下，参照了<a href="http://blog.csdn.net/djyangmaowei/archive/2009/09/11/4542743.aspx" target="_blank">这篇文章</a>。不懂得太多了，还得回去不信号与线性系统，这个毕设对于我来说还是很有挑战性的。</p>
<p>步骤：<br />
1. 建立训练数据库<br />
2. 声学（Acoustical）分析<br />
3. 定义模型<br />
4. 训练模型<br />
5. 定义任务<br />
6. 识别未知信号<br />
7. 评价<br />
<span id="more-781"></span><br />
过程<br />
1. 建立训练资料<br />
a. 录制音频<br />
<code>HSLab name.sig</code><br />
b. 标记信号<br />
在HSLab中标记信号位置<br />
2. 声学（Acoustical）分析<br />
a. 配置参数（analysis.conf）<br />
<code>#<br />
# Example of an acoustical analysis configuration file<br />
#<br />
SOURCEFORMAT = HTK                         # Gives the format of the speech files<br />
TARGETKIND = MFCC_0_D_A                          # Identifier of the coefficients to use<br />
# Unit = 0.1 micro-second :<br />
WINDOWSIZE = 250000.0                     # = 25 ms = length of a time frame<br />
TARGETRATE = 100000.0                     # = 10 ms = frame periodicity<br />
NUMCEPS = 12                                       # Number of MFCC coeffs (here from c1 to c12)<br />
USEHAMMING = T                                   # Use of Hamming function for windowing frames<br />
PREEMCOEF = 0.97                              # Pre-emphasis coefficient<br />
NUMCHANS = 26                                     # Number of filterbank channels<br />
CEPLIFTER = 22                                   # Length of cepstral liftering<br />
# The End</code><br />
b. 源目标列表（targetlist.txt）<br />
<code>data/train/sig/yes01.sig        data/train/mfcc/yes01.mfcc<br />
data/train/sig/yes02.sig        data/train/mfcc/yes02.mfcc<br />
etc...<br />
data/train/sig/no01.sig         data/train/mfcc/no01.mfcc<br />
data/train/sig/no02.sig         data/train/mfcc/no02.mfcc<br />
etc...</code><br />
c. 使用HCopy进行声学分析<br />
<code>HCopy -C analysis.conf -S targetlist.txt</code><br />
3. 定义模型<br />
<code>~o &lt;VecSize&gt; 39 &lt;MFCC_0_D_A&gt;<br />
~h "lable"<br />
&lt;BeginHMM&gt;<br />
&lt;NumStates&gt; 6<br />
&lt;State&gt; 2<br />
&lt;Mean&gt; 39<br />
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0<br />
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0<br />
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0<br />
&lt;Variance&gt; 39<br />
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0<br />
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0<br />
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0<br />
&lt;State&gt; 3<br />
&lt;Mean&gt; 39<br />
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0<br />
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0<br />
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0<br />
&lt;Variance&gt; 39<br />
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0<br />
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0<br />
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0<br />
&lt;State&gt; 4<br />
&lt;Mean&gt; 39<br />
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0<br />
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0<br />
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0<br />
&lt;Variance&gt; 39<br />
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0<br />
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0<br />
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0<br />
&lt;State&gt; 5<br />
&lt;Mean&gt; 39<br />
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0<br />
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0<br />
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0<br />
&lt;Variance&gt; 39<br />
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0<br />
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0<br />
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0<br />
&lt;TransP&gt; 6<br />
0.0 0.5 0.5 0.0 0.0 0.0<br />
0.0 0.4 0.3 0.3 0.0 0.0<br />
0.0 0.0 0.4 0.3 0.3 0.0<br />
0.0 0.0 0.0 0.4 0.3 0.3<br />
0.0 0.0 0.0 0.0 0.5 0.5<br />
0.0 0.0 0.0 0.0 0.0 0.0<br />
&lt;EndHMM&gt;</code><br />
4. 模型训练<br />
a. 初始化<br />
<code>HInit -S trainlist.txt -M model\hmm0 -H model\proto\hmm_sil -l sil -L data\train\lab sil<br />
HCompv -S trainlist.txt -M model/hmm0flat -H model/proto/hmm_no -f 0.01 no</code><br />
b. 训练<br />
<code>HRest -S trainlist.txt -M model/hmm1 -H model/hmm0flat/vFloors -H model/hmm0/hmm_yes -l yes -L data/train/lab yes</code><br />
一直提示错误，不知道为什么，去掉-H model/hmm0flat/vFloors后正常</p>
<p><code>HRest -S trainlist.txt -M model/hmm1  -H model/hmm0/hmm_yes -l yes -L data\train\lab yes<br />
HRest -S trainlist.txt -M model/hmm2  -H model/hmm1/hmm_yes -l yes -L data\train\lab yes<br />
HRest -S trainlist.txt -M model/hmm3  -H model/hmm2/hmm_yes -l yes -L data\train\lab yes<br />
HRest -S trainlist.txt -M model/hmm1  -H model/hmm0/hmm_no -l no -L data\train\lab no<br />
HRest -S trainlist.txt -M model/hmm2  -H model/hmm1/hmm_no -l no -L data\train\lab no<br />
HRest -S trainlist.txt -M model/hmm3  -H model/hmm2/hmm_no -l no -L data\train\lab no<br />
HRest -S trainlist.txt -M model/hmm1  -H model/hmm0/hmm_sil -l sil -L data\train\lab sil<br />
HRest -S trainlist.txt -M model/hmm2  -H model/hmm1/hmm_sil -l sil -L data\train\lab sil<br />
HRest -S trainlist.txt -M model/hmm3  -H model/hmm2/hmm_sil -l sil -L data\train\lab sil</code><br />
5. 定义任务<br />
a. 语法（gram.txt）<br />
<code>/*<br />
* Task grammar<br />
*/<br />
$WORD = YES | NO;<br />
( { START_SIL } [ $WORD ] { END_SIL } )<br />
b. 字典（dict.txt)<br />
YES [yes] yes<br />
NO [no] no<br />
START_SIL [sil] sil<br />
END_SIL [sil] sil</code><br />
c. 使用HParse和HSGen建立状态网络<br />
<code>HParse -A -D -T 1 def/gram.txt def/net.slf<br />
HSGen -A -D -n 10 -s def/net.slf def/dict.txt</code><br />
6. 识别未知信号，使用HVite<br />
<code>HVite -A -D -T 1 -H model/hmm3/hmm_yes -H model/hmm3/hmm_no -H model/hmm3/hmm_sil -i reco.mlf -w def/net.slf def/dict.txt hmmlist.txt input.mfcc</code><br />
hmmlist.txt 为hmm名称列表，和hmm搞混了，纳闷了好久<br />
7. 评价（略）</p>
<h3  class="related_post_title">您可能也关注于:</h3><ul class="related_post"><li><a href="http://blog.anyshpm.com/2011/07/18/transformers-dark-of-the-moon.html" title="Transformers: Dark of the Moon ">Transformers: Dark of the Moon </a> (0)</li><li><a href="http://blog.anyshpm.com/2008/07/25/%e5%82%bb.html" title="傻">傻</a> (0)</li><li><a href="http://blog.anyshpm.com/2009/02/08/%e6%9d%82%e8%ae%b0.html" title="杂记">杂记</a> (3)</li><li><a href="http://blog.anyshpm.com/2010/02/09/change-wordpress-permalinks-404-error.html" title="修复因改变wordpress固定链接而导致的404错误">修复因改变wordpress固定链接而导致的404错误</a> (1)</li><li><a href="http://blog.anyshpm.com/2008/03/09/hello-world-14.html" title="原谅他吧">原谅他吧</a> (5)</li><li><a href="http://blog.anyshpm.com/2009/07/16/%e8%ae%b0.html" title="记">记</a> (1)</li><li><a href="http://blog.anyshpm.com/2008/07/18/%e5%a4%a9%e6%b0%94%e5%be%88%e7%83%ad%ef%bc%8c%e5%bf%83%e6%83%85%e5%9c%a8%e5%8f%98%e5%8c%96.html" title="天气很热，心情在变化">天气很热，心情在变化</a> (2)</li><li><a href="http://blog.anyshpm.com/2009/08/21/%e9%97%b2%e6%9d%a5%e6%97%a0%e4%ba%8b%ef%bc%8c%e7%8e%a9%e7%8e%a9%e6%b8%b8%e6%88%8f.html" title="闲来无事，玩玩游戏">闲来无事，玩玩游戏</a> (0)</li><li><a href="http://blog.anyshpm.com/2008/11/13/v8%e8%bf%9e%e6%8e%a5%e8%ae%be%e7%bd%ae.html" title="V8连接设置">V8连接设置</a> (0)</li><li><a href="http://blog.anyshpm.com/2009/09/06/%e8%8a%a6%e8%8d%9f.html" title="芦荟">芦荟</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.anyshpm.com/2010/03/10/yes-or-no-recognition-system-under-htk.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

