htk调试入门

转载:http://blog.sina.com.cn/s/blog_4989462f01014qyf.html

HTK及相关资源简介,VS2005/2008环境下调试HTK的步骤。新手入门~

============================================================

HTK是剑桥大学开发的Hidden Markov Models工具包,主要用于搭建语音识别系统。详细介绍请看The HTK Book。

剑桥大学的HTK主页:
http://htk.eng.cam.ac.uk/
注册以后,可以下载HTK相关资源:

1、HTK  3.4.1 source code
HTK源代码,全部用C语言写成~
解压后有若干个文件夹:
HTKLib  -  语音识别库函数
HTKTools  -  语音识别工具,如HCopy、HERest...
HLMLib  -  语言模型库函数
HLMTools - 语言模型工具,如LBuild、LAdapt...

2、The HTK Book
HTK工具说明文档,入门必备。
如果只将HTK作为工具包使用,翻阅The HTK Book绰绰有余。

3、HTK Samples
Perl搭建的电话拨号系统Demo。
(Note:虽不明,但觉厉。)

4、HTK Extensions
有用的小资源,比如HDecode、HTS、Voicebox
HDecode是针对LVCSR任务专门优化的解码器,效率比HVite高,但只支持cross-word三音子模型,使用方面有诸多限制,可以作为解码器优化的范例。

5、ATK 1.6.0
用C++对HTK各个库进行封装,支持多线程,用MFC写了界面,支持在线语音识别。
可以作为搭建实用语音识别软件的范例。
(Note:没用过。。。)

下载代码后,可以开始调试HTK了~

============================================================

VS2005调试HTK的新手教程,转帖一下:

*利用Visual Studio搭建HTK的编程环境步骤:

http://www.co.it.pt/~aveiga/htk/debughtktools.html


Debugging an HTK tools using Visual Studio 2005 (VS2005)

v   1 – Open VS2005;

v   2 – Go to “File -> New Project”. Expand “Visual C++” and select “Win32”. Select “Win32 Console Application” template. Write project name and click OK button.

v   3 – On the wizard windows, in “Application Settings”, select the fallow options:

?    Application type: Console application;
?    Additional options: Empty project;
?    And click “Finish” button.

v   4 – Identify project directory (where is locate the project file with extension .cvproj). Copy to project directory the tool file locate in “HTKTools” directory and the directory “HTKLib”.

v   5 – Back to VS2005 and adding files. On “Solution Explorer”, right click on “Source Files” and select “Add -> Existing Item” and add the tool file.
(添加文件要看tools用到哪些库,把HTKLib里的文件全加进来也是可以的,但要注意删掉HGraf系列文件哦~)

Add also all source files in “HTKLib” directory (*.c), except the fallows files: “HArc.c”, “HExactMPE.c”, “HFBLab.c”, “HGraf.c” and “HGraf.null”.

On “Header Files” add all header files in “HTKLib” directory (*.h), except the fallows files: “HArc.h”, “HExactMPE.h” and “HFBLab.h”.

v   6 – Change project proprieties (Project -> ‘prj name’ Proprieties) as follows:
(修改设置:重要步骤!)

?    “Configuration Proprieties -> C/C++ -> General -> Additional Include Directories”: .HTKLib;
?    “Configuration Proprieties -> C/C++ -> General -> Warning Level”: Off: Turn Off All Warnings (/W0);
?    “Configuration Proprieties -> C/C++ -> Command Line -> Additional options”: /wd4335 /D "WIN32_AUDIO"  /D ARCH="WIN32" /D isnan=_isnan;
?    “Configuration Proprieties -> Linker -> Input -> Additional Dependencies”: winmm.lib;


It’s all done. Build and start debugging.

Arlindo Oliveira da Veiga

============================================================

按照上文步骤,建立HERest工程,编译通过~
“Configuration Proprieties -> Debugging -> Command Arguments"  设置命令行参数,可以开始调试了~

原文地址:https://www.cnblogs.com/ldjhust/p/3183973.html