VoIP Chatter Bot

AMIL + Sphinx + Asterisk + Trixbox = A complete voice chat system

This is the beginning of an attempt to create an AMIL based chatter bot using Sphinx for voice recognition on an asterisk/trixbox 2.0 server. To the right is a list of resources that I am using in the creation of this project. The goal is to attempt to emulate a complete conversion albeit with a computer. I doubt that with current voice recognition technologies and the limitations of Flite this will be an effective fake but its worth a try for the exercise. I will continue to update this page as I progress forward with this project, check back for updates!


THIS TUTORIAL ASSUMES A BASIC LEVEL OF FAMILIARITY WITH TRIXBOX, PHP, MySQL and LINUX.

  • To begin the project I installed ProgramE to Trixbox:

Download the programE files to the webserver portion of trixbox:

cd /var/www/html

mkdir programe

wget http://easynews.dl.sourceforge.net/sourceforge/programe/programe-v.09.zip

unzip *zip

cd aiml

wget http://internap.dl.sourceforge.net/sourceforge/programe/standard-aiml-1.1.17-programe.zip

unzip *zip


Congratulations you now have a copy of ProgramE on your trixbox. Now you need to create the database that the program will use. Hopefully you have phpmyadmin installed if not you should do that now. Jump to your trixbox admin page hit the settings tab and choose phpmyadmin. Now create a database called programe. Select that database and choose the SQL tab. Now open the file located at sql/mysql/db.sql and copy paste the entire file into phpmyadmin and execute it. You should now have a database that looks like this:

Now chmod 777 the src/admin folder. Also be sure to edit the src/admin/dbprefs.php file so that it has the correct information to access your new database. Now open the dbprefs.php file and modify the settings at the bottom of the file, make sure you change the root directory to the aiml folder for the bot with the all the aiml files you unpacked earlier. dbprefs.php is located under src/admin/

You'll probaly want to change the various subject matter and responses to your own liking. Simply edit the various files in the aiml directory to suit your purposes. 

now access the install php http://<mytrixboxip>/programe/src/admin/botloader.php and it will run through the configuration of the bot.

This can take some time depending on your modifications to the scripts and what you chose to load. Once this process is complete you can test out the bot by accessing http://<mytrixboxip>/programe/src/talk.php

The final config when complete should look something like this:

 Be sure that you secure the admin directory!

Now we need to setup Sphinx2 for voice recognition on the Trixbox.

yum -y install sphinx2.i386

Now following directions from Josh:

Install a simple dictionary:  

cd /usr/share/sphinx2/model/lm

wget  http://turnkey-solution.com/confirm.tgz

Download a different speech model:

wget http://www.speech.cs.cmu.edu/sphinx/models/hmm/communicator-2000-11-17-2.tgz

Install it:

Create a new directory: /usr/share/sphinx2/model/hmm/communicator

Untar the files and move them to this folder.

I'll finish the setup later. I much larger dictionary will need to be found to completly setup the sphinx application. I am searching for one now.

Comments or suggestions, send them to nullvariable a t g m a i l d o t c o m.

Sphinx+Asterisk

A.L.I.C.E/AMIL 

 A.L.I.C.E on Perl