VS2005调试HTK

Debugging an HTK tools using Visual Studio 2005 (VS2005)

1 – Open VS2005;

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.

 

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”.

 

add "HInit.c"

 

 

v   6 – Change project proprieties (Project -> ‘prj name’ Proprieties) as fallows:

Ø    “Configuration Proprieties -> C/C++ -> General -> Additional Include Directories”: ./HTKLib;  ../HTKTools;

Ø    “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.

 

 

 

 

Windows下建立HTK3.4

Installation

Prerequisites

  • HTK has been verified to compile using Microsoft Visual Studio.
  • For testing, you will require a Perl interpreter such as ActivePerl.
  • You will need a tool such as 7-zip for unpacking the HTK source code archive.
  • Register on this site by accepting the HTK End User Licence Agreement, then download the latest HTK source code.
  • It is helpful if you have some familiarity with using the DOS command line interface, as you will need to interact with it in order to compile, install and run HTK.
  • Ensure that your PATH contains C:/Program Files/Microsoft Visual Studio/VC98/bin

Compilation

  1. Unpack the HTK sources using 7-zip.
  2. Open a DOS command window: Click Start, select Run type cmd at the prompt and click OK.
  3. cd into the directory in which you unpacked the sources.
  4. cd into the htk directory. Type:
    cd htk
  5. Create a directory for the library and tools. Type:
    mkdir bin.win32
  6. Run VCVARS32 (it should be in your path, see prerequisites above)
  7. Build the HTK Library, which provides the common functionality used by the HTK Tools. Enter the following commands:
    cd HTKLib
    nmake /f htk_htklib_nt.mkf all
    cd ..
  8. Build the HTK Tools
    cd HTKTools
    nmake /f htk_htktools_nt.mkf all
    cd ..
    cd HLMLib
    nmake /f htk_hlmlib_nt.mkf all
    cd ..
    cd HLMTools
    nmake /f htk_hlmtools_nt.mkf all
    cd ..

    Installation

    The HTK tools have now been built and are in the bin.win32 directory.

    You should add this directory to your PATH,

    so that you can run them easily from the command line in future.

TEST:

Before running the demo make sure you have compiled all the HTK tools and the executables are in your PATH, please refer to this Microsoft TechNet article for instructions. You can verify that your path is set correctly by typing 'HInit' at the commandline, which should produce a short usage summary.

 

To run the demonstration type:

cd HTKDemo mkdir hmms cd hmms mkdir tmp mkdir hmm.0 mkdir hmm.1 mkdir hmm.2 mkdir hmm.3 cd .. mkdir proto mkdir acc mkdir test perl runDemo.pl configs/monPlainM1S1.dcf

The recognition results obtained should match the following.

On the training set:

------------------------ Overall Results -------------------------- SENT: %Correct=0.00 [H=0, S=7, N=7] WORD: %Corr=77.63, Acc=74.89 [H=170, D=37, S=12, I=6, N=219] ===================================================================

On the test set:

------------------------ Overall Results -------------------------- SENT: %Correct=0.00 [H=0, S=3, N=3] WORD: %Corr=63.91, Acc=59.40 [H=85, D=35, S=13, I=6, N=133] ===================================================================

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值