HTK
HTK's licence
requires you to register
before you can download the toolkit. The software is open
source but there are limitations on the distribution of the HTK
Toolkit itself. However, there is no limitation on the
distribution of the models you create with the toolkit.
Step 1 - Register
with HTK
Step 2 - Download HTK Toolkit and Samples
Create a new directory in your home directory called 'bin', it
should have the following path (replace 'yourusername' with the user name
you are using on your system):
click the following links:
and save them to your new bin directory.
Step 3 - Download HTK Book Click the following link:
and save it to your new bin directory.
The HTK book is an excellent reference to the toolkit commands.
However, it is written for speech scientists and can be very
confusing to beginners.
Step 4 - Unpack you source files
Extract the files using:
Nautilus (right click each tar/gzipped file and click extract here); or use tar from the command line for the following files:tar -xvzf HTK-3.4-alpha.tar.gz tar -xvzf HTK-samples-3.4-alpha.tar.gz
tar -xvzf htkbook_html.tar.gz
this should create the following directories in your bin folder:
move the 'samples' and 'htkbook' directories to your htk-3.4 folder.
Step 5 - Compile & Install HTK Compiler version If you have a newer version of the gcc compiler (version 4 or above), you will need to install gcc version 3.4 compatibility modules so that HTK will compile properly. Use gcc's version command to see which version is installed on your system:
$gcc -v
Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=x86_64-redhat-linux Thread model: posixgcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC)
If you have version 4.0 or above (I have version 4.3.0) use yum to install the required files to your system:
$su
#yum install compat-gcc-34-c++ compat-gcc-34
32-bit Systems
After unpacking the sources, open a command line terminal and go
to the /hom/yourusername/bin/htk3.4 directory where you downloaded your files.
configure The default location for binaries is "/usr/local" which
will put the tools in "/usr/local/bin". You need to change this
default location using the "./configure" script to specify where you
want the
binaries installed:
$./configure --prefix=/home/yourusername/bin/htk-3.4
This directs the make command to put all your binaries in the following folder:
/home/yourusername/bin/htk-3.4/bin.linux
64-bit Systems
After unpacking the sources, open a command line terminal and go
to the /hom/yourusername/bin/htk3.4 directory where you downloaded your files.
You now need to install 386 compatibility versions of some development libraries:
$su
#yum install glibc-devel.i386 libX11-devel.i386
configure The default location for binaries is "/usr/local" which
will put the tools in "/usr/local/bin". You need to change this
default location using the "./configure" script to specify where you
want the
binaries installed:
$./configure CC=gcc34 --prefix=/home/yourusername/bin/htk-3.4
This directs the make command to put all your binaries in the following folder:
/home/yourusername/bin/htk-3.4/bin.linux
make
To build the libraries and binaries, execute the following:
Running the following command will install them:
Step 6 - Copy required HTK Perl Scripts Create a new directory called "HTK_scripts" in your voxforge folder, it should have the following path:
/home/yourusename/voxforge/HTK_scripts
Copy
the following HTK scripts to your newly created 'HTK_scripts'
folder:
mkclscript.prl (located in /htk-3.4/samples/RMHTK/perl_scripts folder) maketrihed (located in /htk-3.4/samples/HTKTutorial folder) prompts2mlf (located in /htk-3.4/samples/HTKTutorial folder) prompts2wlist (located in /htk-3.4/samples/HTKTutorial folder) Julius
Julius
has no limitations on distribution. It uses Acoustic Models in
HTK format, and Grammar files in its own format.
Julius is a large vocabulary
continuous speech recognition (LVCSR) engine. Julius is used in dictation applications.
Julian is a special version of Julius that performs grammar based speech recognition. Julian is used for command and control applications.
We will be using the Julian version of Julius for this tutorial.
Step 1 - Download Julius click the following link:
and save it to your '/home/yourusename/bin' directory.
(note: if you want to compile Julius from source, see this FAQ entry)
Step 2 - Extract Julius
Extract the file using:
Nautilus (right click the tar/gzipped file and click extract here) use tar from the command line:tar -xvzf julius-3.5.2.tar.gz
this should create a julius-3.5.2 directory in your bin folder.
Update User Path
To update your user path, you need to
add the following directories your user path
variable:
/home/yourusename/bin/htk-3.4/bin.linux;
/home/yourusename/bin/htk-3.4/lib.linux; and
/home/yourusename/bin/julius-3.5.2-multipath-linuxbin/bin.
To do this, edit your '.bash_profile' file in your home
directory (in Fedora you need to show 'hidden files' in Nautilus - so
you can display file names with a period in front of them). You do this
by adding the listed paths, separated by a colon (":") to the end of
the PATH variable as follows (all one line, no spaces):
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/home/yourusename/bin/htk-3.4/bin.linux:
home/yourusename/bin/htk-3.4/lib.linux:
/home/yourusename/bin/julius-3.5.2-multipath-linuxbin/bin
Log out and log back in to make your path change effective.
Audacity
If you are using Linux (we will be using the Fedora for these tutorials) use
the following command to download and install Audacity (as superuser):
$su
Password:
#yum install audacity
Click here to download Audacity from its web site.
Comments
Click the 'Add' link to add a comment to this page; click the 'Read More' link to view replies to a posted comment.
Add
•
Search
Compiling 64-bit HTK
By kmaclean
-
1/4/2010
- 1 Replies
From the HTK mailing list (I have not tried this yet...):
Yes, on 64-bits the GCC compiler use -m64 to generate
binary files for 64-bit architecture, also add -L options with the path
for the libraries like X11. That should solve your problems. Regards, Vitorio. Le 2009-12-18 à 13:48, Elias Gerber a écrit : > -m32 -a
Can not execute 'julian'
By daFunkyUnit
-
11/10/2009
- 1 Replies
I am running on Mac OS X 10.5.8, and I cannot execute the julian command, saying that it "cannot execute binary file."
I un-tar'ed julius-3.5.2-multipath-linuxbin in where my HTK is installed, and I have added paths for HTK and julius into the $PATH environment variable. I have checked the permissions for all the files in the julius-3.5.2-multipath-linuxbin/bin directory and they all are "-rwxr-xr-x" so they all should be executable. But I can not execute any of the commands, except for the perl scripts (gram2sapixml.pl, mkdfa.pl, yomi2voca.pl)
Please help!
Thanks, -bao
question
By toothdoc
-
7/19/2009
- 1 Replies
1. from Windows Explorer, use a Cygwin editor (such as Vim) to edit:
c:/cygwin/etc/bash.bashrc
and add the following lines:
PATH=/Julius/bin:/HTK/htk-3.3-windows-binary/htk:$PATH export PATH
There is no bash.bashrc file in etc folder. What am supposed to do now? Did I do something wrong?
compiling HTK using Microsoft Visual Studio
By kmaclean
-
6/17/2009
From this post: Installing HTK on Microsoft Windows(음성인식 software)
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
Unpack the HTK sources using 7-zip.
Open a DOS command window: Click Start , select Run type cmd at the prompt and click OK .
cd into the directory in which you unpacked the sources.
cd into the htk directory. Type:
cd htk
Create a directory for the library and tools. Type:
mkdir bin.win32
Run VCVARS32 (it should be in your path, see prerequisites above)
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 ..
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.
Ibex
By sirjoy
-
5/2/2009
I have Ubuntu 9.04. I couldnt make HTK works on /home/username/bin/htk so I used the ./configure without arguments and so it will be installed on /usr/local/bin instead. After this it works well
make install fails
By RobotJay
-
2/24/2009
- 1 Replies
I finally got the "make all" command to (seemingly) work. Now, when I run "make install" I get the following error:
jay@######:~/bin/htk$ make install (cd HTKTools && make all) \ || case "" in *k*) fail=yes;; *) exit 1;; esac; make[1]: Entering directory `/home/jay/bin/htk/HTKTools' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/jay/bin/htk/HTKTools' (cd HTKTools && make install) \ || case "" in *k*) fail=yes;; *) exit 1;; esac; make[1]: Entering directory `/home/jay/bin/htk/HTKTools' if [ ! -d /jay/bin/htk/bin ] ; then mkdir /jay/bin/htk/bin ; fi mkdir: cannot create directory `/jay/bin/htk/bin': No such file or directory make[1]: *** [mkinstalldir] Error 1 make[1]: Leaving directory `/home/jay/bin/htk/HTKTools' make: *** [install-htktools] Error 1
I can't find any help for this anywhere, so I'd appreciate any you can offer. TIA.
-Jay
P.S. I'm running Ubuntu Intrepid Ibex on a 32-bit system.
Additional Instructions to compile HTK on Ubuntu 8 (Hardy)
By psthomas@gmail.com
-
12/2/2008
Okiedokie people, Here are some solutions to a number of problems that I saw people having (myself included):
Alternate Ubuntu Directions for Step 5 above (from a mostly clean Hardy install): 1) You'll need gcc 3.4 (as mentioned) 2) Use synaptic or apt to get: - cpp-3.4 - gcc-3.4 - gcc-3.4-base 3) Try to run configure. 4) If you see an error like "configure:1799: error: C compiler cannot create executables" then it's probably because you're missing some link libraries. Use synaptic/apt to get: - libc6-dev 4) Try to "make all" 5) If you see an error like "HGraf.c:73:77: X11/Xlib.h: No such file or director", then you need: - libx11-dev 6) Now "make all" should succeed. Hope that helps! ~PST Some references: - http://groups.google.com/group/emm-ruby/browse_thread/thread/d1b5dafeb6296d3d?pli=1 - http://anaaman.blogspot.com/2006/01/crt1o-no-such-file-no-such-file-or.html - http://ubuntuforums.org/archive/index.php/t-49497.html
error
By hamid
-
9/4/2008
- 6 Replies
Hi,
when I want update my path environment variable it gives me error and testing HTK/julius dosen't gives me the expected results. when I open Cygwin it gives me this:
bash: $'\r': comand not found bash: $'\r': comand not found ': not a valid identifier bash: $'\r': comand not found
what should I do?
best regards, Hamid.
Makefile Errors?
By Ramen
-
8/8/2008
- 1 Replies
I am trying to follow the instructions listed above for installing HTK. I am using a 32-bit system. I get as far as running
$./configure --prefix=/home/yourusername/bin/htk-3.4
But when I try to run make all, I get about 800 errors. At the top of the list of errors, my terminal says,
"HGraf.c:73:77: error: X11/Xlib.h: No such file or directory HGraf.c:74:23: error: X11/Xutil.h: No such file or directory HGraf.c:75:21: error: X11/Xos.h: No such file or directory HGraf.c:77:27: error: X11/keysymdef.h: No such file or directory"
and then it has several lines of stuff looking like,
"HGraf.c:87: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token"
Does anyone know what's going on here/how I can fix this?
By the way, I coculd not find a module to make my version of GCC compatible with 3.4. Instead, I simply downloaded GCC 3.4 and edited the Makefile so that it would run GCC 3.4 instead of my new version of GCC.
Thanks!
HTK comple error.
By Sergey S.
-
4/12/2008
- 5 Replies
Hello,
I am trying to compile HTK-3.4 on Ubuntu 7.10 but I get this error:
make all
...
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libX11.so when searching for -lX11 /usr/bin/ld: skipping incompatible /usr/bin/../lib/libX11.a when searching for -lX11 /usr/bin/ld: skipping incompatible /usr/lib/libX11.so when searching for -lX11 /usr/bin/ld: skipping incompatible /usr/lib/libX11.a when searching for -lX11 /usr/bin/ld: cannot find -lX11 collect2: ld returned 1 exit status make[1]: *** [HSLab] Error 1 make[1]: Leaving directory `/home/serg/bin/htk/HTKTools' make: *** [htktools] Error 1
Any idea what might be wrong?
Thanks in advance,
--Sergey
Julius 4.0.1
By kmaclean
-
3/12/2008
Some compile problems with Julius 4.0 on Cygwin have been fixed in Julius 4.0.1 .
Compiling HTK 3.4 on Windows XP
By kmaclean
-
9/30/2007
- 3 Replies
error in compiling julian
By amza
-
1/7/2008
- 2 Replies
I compile julian from source (julius-3.5.2.tar.gz, and then extracts it), because I need julian, not julius, by typing the command as follows:
$./configure --prefix=/home/riset/bin/julius-3.5.2 --enable-julian
The compile didn't work well because there are errors as follows: $ ./configure --prefix=/home/riset/bin/julius-3.5.2 --enable-julian >a.txt ./configure: line 1033: cmp: command not found ./configure: line 714: cmp: command not found configure: warning: no iconv, gram2sapixml.pl may not work ./configure: line 1331: cmp: command not found ./configure: line 1203: cmp: command not found ./configure: line 2009: cmp: command not found configure: warning: not found configure: warning: libsndfile enables AIFF AU SND NIST format for Julius. It's available at http://www.mega-nerd.com/libsndfile/ ./configure: line 3094: cmp: command not found
I don't understand the command "cmp" in "configure" file, because the file is already available. Can you help me? I haven't been able to run julian yet since 3 weeks ago. Thank you.
~amza
error in compiling HTK and Julius
By hazel
-
1/6/2008
- 1 Replies
1. I have already configured HTK by using command "./configure .......", but when I type in "make all" on cygwin bash shell, there is errors as follows:
$ make all make[1]: Entering directory `/home/riset/bin/htk-3.3/HTKLib' gcc -Wall -Wno-switch -g -O2 -I. -c -o HShell.o HShell.c HShell.c: In function `KeyPressed': HShell.c:1487: error: `FIONREAD' undeclared (first use in this function) HShell.c:1487: error: (Each undeclared identifier is reported only once HShell.c:1487: error: for each function it appears in.) make[1]: *** [HShell.o] Error 1 make[1]: Leaving directory `/home/riset/bin/htk-3.3/HTKLib' make: *** [all] Error 1
2. I also have extracted julius-3.5.3 to "/home/riset/bin". When I compiled julian by typing:
$./configure --prefix=/home/riset/bin/julius-3.5.3 --enable-julian
there is an error as follows:
bash: $./configure: No such file or directory
Can you help me to solve these two problems, please? Thank you.
~hazel
compile and install htk
By amza
-
12/31/2007
- 6 Replies
When I configured HTK by exceuting command:
$./configure --prefix=/home/yourusername/bin/htk-3.3
There is an error like this:
bash: ./configure: No such file or directory
How to solve this problem? Thank you...
HTK INSTALLATION
By kat_wills
-
12/28/2007
- 1 Replies
Hi,
It is about installation of htk.I already have htk installed on my linux system,but the location of installation is different from the steps specified on this tutorial.I have tried installing multiple copies but it did not work.
Since htk has already been installed and working,can I skip the section on htk and focus on other parts of the tutorials or must it be installedfollowing your steps.
cheers.
error in testing julius
By amza
-
11/22/2007
- 11 Replies
I have followed all directions, but the julius testing doesn't work. When I typed "julian" on Cygwin Bash Shell, it doesn't display the version of Julius, it's just blank. I don't know what is missing when installing julius, I have done all steps. Can you help me? Thank you.
ERROR TESTING JULIUS
By rovira74
-
10/20/2007
- 3 Replies
Hi,
I was unable to test julius installation at the prompt as directed but when I typed julian,it gave the version.
Was there any error or are 'julius' and 'julian' commands the same