I wrote about installing Sphinx3 last time. It can be possible to integrate speech recognition in your applications with Sphinx3 API. Before we can go to further step, we have to know how to compiling and link library to you programs. I testes that by copying files main_livedecode.c and main_livepretend.c in sphinx3/src/programs to my directory. Then I write a simple make file to build it as follows
CXX = g++
CXXFLAGS = -g -O2 -Wall -I/usr/local/include/sphinx3 -I/usr/local/include/sphinxbase
LIBS = -L/usr/local/lib -ls3decoder -lsphinxad -lsphinxbase -lm
all: main_livedecode.o main_livepretend.o
$(CXX) $(CXXFLAGS) -o main_livedecode main_livedecode.o $(LIBS)
$(CXX) $(CXXFLAGS) -o main_livepretend main_livepretend.o $(LIBS)
main_livedecode.o: main_livedecode.c
$(CXX) $(CXXFLAGS) -c $<
main_livepretend.o: main_livepretend.c
$(CXX) $(CXXFLAGS) -c $<
clean:
rm -rf *.o
rm -rf *~
rm -rf *.raw
rm -f main_livedecode main_livepretend
.PHONY: clean
After this you can study how it work in files main_livedecode.c and main_livepretend.c.
October 21st, 2008 | Posted in Artificial Intelligence, Linux, Software | No Comments
SPHINX is one of the best and most versatile recognition systems in the world today. I just installed Sphinx3 from tar ball source file as suggest in their page. I choose SPHINX-3 because it uses continuous HMMs. It can handle both live and batch decoding. Currently, it is the decoder most actively developed. I build it on Ubuntu 8.04. First of all, please download these two files sphinx3.nightly.tar.gz and sphinxbase.nightly.tar.gz.
Compiling process are as follows
$tar xzf sphinxbase.nightly.tar.gz
$tar xzf sphinx3.nightly.tar.gz
$cd sphinxbase
$./configure
$make
$cd ../sphinx3
$configure --prefix=/usr/local --with-sphinxbase=`pwd`/../sphinxbase
$make
$sudo make install
If you want to compile the source code retrieved from SVN, please refer to this page.
October 21st, 2008 | Posted in Artificial Intelligence, Linux, Software | 1 Comment
As suggested in its docs page, there are some details in compiling and linking Festival C/C++ applications. You need to install at least libesd0-dev, libncurses5-dev and festival-dev (on Ubuntu 8.04). I test by copy the simple example from their page to my source test_festival.cpp which is
//file: test_festival.cpp
#include <festival.h>
int main(int argc, char **argv)
{
EST_Wave wave;
int heap_size = 210000; // default scheme heap size
int load_init_files = 1; // we want the festival init files loaded
festival_initialize(load_init_files,heap_size);
// Say simple file
festival_say_file("/etc/motd");
festival_eval_command("(voice_ked_diphone)");
// Say some text;
festival_say_text("hello world");
// Convert to a waveform
festival_text_to_wave("hello world",wave);
wave.save("/tmp/wave.wav","riff");
// festival_say_file puts the system in async mode so we better
// wait for the spooler to reach the last waveform before exiting
// This isn't necessary if only festival_say_text is being used (and
// your own wave playing stuff)
festival_wait_for_spooler();
return 0;
}
To compile and build it, I do the following commands:
$g++ -c test_festival.cpp \\
-I /usr/include/estools -I /usr/include/festival/
$g++ -o test_festival test_festival.o \\
-lFestival -lestools -lestbase -leststring -lesd -lncurses
Finally, type ./test_festival to run it. Cool! isn’t it?
October 19th, 2008 | Posted in Artificial Intelligence, Linux | 1 Comment
Another way to learn AIML is learning by using it. There is a free service called Pandorabots which allows you to create your own AIML bot and train it. However, you have to work online. If we want to use it offline, we have a great deal of open source implementations of AIML. Among of them, QAIML (ProgramQ) is a good candidate for me because it is written by C++ with Qt – cross-platform GUI framework. I have succeeded installing it on Ubuntu 8.04 (Hardy).
To install:
- Firstly, you have to install Qt development.
- Download QAIML source from here. Then do the following commands:
$tar xjf ProgramQv1_1.tar.bz2
$cd ProgramQ
$qmake -o Makefile ProgramQ.pro
$make
- Now you will get ProgramQ executable file. To run it just simply type:
It is a small program but cool!
October 19th, 2008 | Posted in Artificial Intelligence, Linux | No Comments
Last time I wrote about Festival: Text to Speech on Linux. Now I found a derived version of them, it called Flite. Flite (festival-lite) is a small, fast run-time synthesis engine developed at CMU and primarily designed for small embedded machines and/or large servers. Flite is designed as an alternative synthesis engine to Festival for voices built using the FestVox suite of voice building tools. To enable it on Ubuntu (8.04), you just type:
sudo apt-get install flite
and then everything will be ready for you. To test it just type:
and this will speak the sentence in quotation. If you want to generate the sound from file, use this command:
It’s a nice text to speech engine. I think I will try to port to an embedded device for the future project.
October 13th, 2008 | Posted in Linux, Robotics and AI, Software | 2 Comments
Refer to my article which I failed to compile the GNU ARM toolchain on Ubuntu. Now the problem was resolved by one of our member in the forums (please see the full post here). He created an automatic script called GNU ARM Installer (download gnu-arm-installer.tar.gz here). You can build the cross compiler for ARM with simple steps:
tar xzf gnu-arm-installer.tar.gz
cd gnu-arm-installer
./gnu-arm-installer.sh
If it is done you will get the toolchain in gnu-arm-installer/install. It is simple but power script.
September 30th, 2008 | Posted in Linux, Microcontrollers | 1 Comment
I just set up CMU Sphinx II on Ubuntu. I just want to test how this Linux Speech Recognition work. I installed the following packages: libsphinx2g0, libsphinx2-dev, sphinx2-bin and sphinx2-hmm-6k. The resource file will be in /usr/share/sphinx2/model/ which contains hmm (Hidden Markov model based-file) and model (Language Model related files). I just type
to test it. It works but not perfectly accuracy output. I think it is needed to be trained. However, It’s a nice Speech Recognition system for Linux.
September 25th, 2008 | Posted in Linux, Robotics and AI, Software | 3 Comments
If you are MS$ fan, you are lucky obtained the MS native Text to Speech and Speech Recognition system. Fortunately, for a Unix-like user, Festival provides such a system. I am using the Ubuntu Linux. To enable Speech to Text, I installed these packages: festival and festvox-kallpc16k. Then, I tested by putting these command:
echo "It's such a beautiful day! Why are you in front of the computer?" \\
| festival --tts
Wow! It is such a cool noise. For more tutorial on Festival, please refer to this page:
http://www.xenocafe.com/tutorials/php/festival_text_to_speech/index.php
September 25th, 2008 | Posted in Linux, Robotics and AI, Software | 1 Comment
Avimator is open-source animation avatar editor for Second Life. This is very interesting because it may can be integrated with AI tool. However, it fails compiling in Ubuntu due to the name file case sensitive (.h or .H) of FLTK. After I fixed this problem, it work fine. You can download my fixed version for Ubuntu here.
September 25th, 2008 | Posted in Linux, Software | 1 Comment
Starting learning X3D with H3D API is a nice stage in my opinion.
H3D API is an open-source, cross-platform, scene-graph API . H3D is written entirely in C++ and uses OpenGL for graphics rendering and HAPI for haptics rendering. HAPI is an open-source haptic API developed by the team behind H3D API. For more information about HAPI see the HAPI manual. H3D API is available under the terms and conditions of the GNU General Public License (GPL).
To install HAPI on Windows follow these steps:
- Download Windows installation file from www.h3d.org.
- Install HAPI using this file.
- Run examples through start menu.
For information on how to build HAPI on Windows see the pdf-manual.
September 25th, 2008 | Posted in Software, Windows | 1 Comment