Compile the speech recognition library kaldi in Visual Studio 2013

Source: Internet
Author: User

The main difficulty in compiling kaldi in Visual Studio 2013 lies in the correct compilation of the kaldi dependency library, mainly including openfst, Atlas, and pthreadvc2, which are the most difficult to compile Atlas. Therefore, in order to make the entire compilation logic clear and concise, compilation of all the dependent libraries of kaldi will be ignored here. If there is time, I will provide the libraries on which it depends.

Compiling environment:

  1. Operating System: Windows 8 (recommended)
  2. Compilation tool: Visual studio2013
  3. Others: Install the complete cygwin Environment

Compilation steps:

  1. Create solution: Open Visual Studio 2013 and create a Win32 project. The solution name is kalid_vs13. You can write a simple helloworld program to test whether the project is successfully created.
  2. Create a project: in solution kalid_vs13, use the DLL Project template to add a new project kalid-lib.
  3. Add source file: Set * under kaldi-trunk/src *. add the CC file to the project kalid-Lib. Note that test files in the * bin directory and other file names that contain the keyword "test" are not allowed here *. add the CC file to kalid-lib
  4. Configure the relevant attributes of kalid-lib, including: 1) configure the reference directory of the header file, 2) pre-processor-defined macros (have_atlas), and 3) reference of the dependent Library (openfst. lib, Atlas. lib, pthreadvc2.lib)
  5. Other configuration: Because the nnet1 and nnet2 directories have the same file name: nnet-nnet.cc and nnet-componet.cc, You need to configure the "object file name" in their respective "output file", for example, you can set the object file name of the nnet-nnet.cc in nnet1 to $ (intdir) nnet1 \, the object file name of the nnet-nnet.cc in nnet2 to $ (intdir) nnet2 \, and other duplicate files, and so on.

Note:

1. To compile the program smoothly, you still need to modify some kaldi source files. I will submit some patches to the official team so that you can compile the program smoothly.

2. The above compiling environment is my own. I'm not sure if other environments can work.

3. This article mainly describes the overall compilation idea of kaldi and does not focus on compilation details for the time being!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.