kaldi/windows/INSTALL

85 строки
3.5 KiB
Plaintext

# Installation instructions for native Windows with Visual
# studio (for cygwin installation, see the instructions
# in ../INSTALL).
# NOTE added in Jan 2012. These instructions are woefully out of date.
# The command below
# cp minimize.h partition.h openfstwin-1.2.6-src/openfst-1.2/src/include/fst
# will not work because those files were removed from recent versions of
# the repository and replaced by a patch file, which is hard to interpret
# on Windows. [Note: the command
# svn up -r 500 minimize.h partition.h
# seems to work to retreive them, although I'm not sure if that's a suitable
# version number, it was just a guess.
# It has been reported to me that the .proj file generated
# by the scripts below do not work on Visual Studio 2010 (version issue?).
# Also we have not been checking that the code compiles in Visual Studio.
# If anyone would like to maintain the Windows setup, we would like that,
# but unfortunately, the situation right now is that it is not being
# maintained.
(A) Installing the Windows version of OpenFst.
This is maintained by Paul Dixon; it has some small code changes versus
the main version of OpenFst, and a Visual Studio solution.
# The next few lines would be executed from cygwin but it's
# pretty obvious what you would have to do from Windows.
cd ../tools
wget http://openfst.cs.nyu.edu/twiki/pub/Contrib/OpenFstWin/openfstwin-1.2.6-src.zip
unzip openfstwin-1.2.6-src.zip
# apply patches to minimization.
cp minimize.h partition.h openfstwin-1.2.6-src/openfst-1.2/src/include/fst
open the solution in openfstwin-1.2.6-src/ and build with Visual Studio. Note:
you should compile in both Release and Debug mode if you will want to compile
Kaldi in both Release and Debug mode (VS doesn't let you mix and match). But
start with Debug initially; Release mode compilation takes a while. For FST
algorithms in particular, code compiled in Debug mode on Windows can be very slow
(e.g. hundreds of times slower than Release mode, for some code; you can see this
with Kaldi's fstext-utils-test.exe). Presumably this is due to the extra
checking that Windows does for STL types in Debug mode.
(B) either
(i) compile ATLAS under cygwin [see INSTALL.atlas] and copy
kaldiwin_atlas.props to kaldiwin.props
or (ii) obtain Intel's MKL library (which costs money; see INSTALL.mkl)
and copy kaldiwin_mkl.props to kaldiwin.props
(C) Generate the Visual Studio 2010 solution file
You can do this from cygwin or DOS.
Before going to the next step, be sure that you created the file
kaldiwin.props as described above.
In cygwin, cd to one level above this file (cd ..) and type
windows/generate_solution.pl
or:
From the Windows command shell, you have to have ActiveState perl installed, or
some other Windows version of perl. cd to one level above this one, and type
perl windows/generate_solution.pl
This generates a solution file in ../kaldiwin_vs10_auto/kaldiwin_vs10.sln
which can be interpreted by Visual Studio 2010.
(D)
If you had installed ATLAS, you next have to do this:
[assuming you are one level above this directory]
cd kaldiwin_vs10_auto/
# type the following (these commands were done from cygwin): note that these
# commands are a bit wasteful of disk; you could alternatively ensure that
# [root]/tools/ATLAS/cygwin_build/install/lib/ is always on your path when you
# run the binaries.
mkdir -p Debug Release
cp ../tools/ATLAS/cygwin_build/install/lib/lib_atlas.dll Debug
cp ../tools/ATLAS/cygwin_build/install/lib/lib_atlas.dll Release
Then build the project with Visual Studio.