hmm模型工具htk在windows上的安装
安装环境win10
- 下载安装包
http://htk.eng.cam.ac.uk/download.shtml
下载对应的的windows版本的(下载需要注册账号)
-
解压
我是解压到:
D:\software_install\
- 安装
D:\software_install\HTK-3.4.1\htk
中的README有安装说明(我是用markdown的编辑器打开),主要分两步如下:
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 or winzip (commercial) for unpacking
the HTK source code archive.
- 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 .NET 2003\Vc7\bin
Or if you are using older versions:
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 ..
现在开始照做:
①添加环境变量
我是安装过vc6++,因此有库
D:\software_install\VC98\Bin
我是把上面的库安装的系统环境变量,(在我的电脑点击属性,高级系统设置,环境变量,点击编辑PATH添加即可,不清楚的读者可以搜索详细操作)
注意:读者若没有装过vc++6.0, 参考readme文档,查找是否有类似C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin和C:\Program Files\Microsoft Visual Studio\VC98\bin可以添加。
bin库下有接下来编译要用到的工具,类似如图:
②运行VCVARS32
把bin文件夹里的VCVARS32.BAT,拷贝到htk文件夹下,打开cmd窗口,cd进入htk文件夹下,运行:
mkdir bin.win32
bin.win32同来存放最后编译生成的exe文件
然后回到htk文件夹下,双击运行VCVARS32.BAT文件。
如图:
③编译
接着在命令提示符窗口敲下如下命令:
cd HTKLib
nmake /f htk_htklib_nt.mkf all
cd ..
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 ..
ok安装完成
得到如下exe文件:
最后一步,把你生成的exe所在目录添加到系统变量,我是把
D:\software_install\HTK-3.4.1\htk\bin.win32
安置到系统变量的PATH中。
enjoy!!!