This page describes how to download and setup an AI intelligent chat agent
and a corresponding speech I/O interface.
Setting up a Local Chatbot
These instructions will talk you through the setup of a local version of the
chatbot for use on your local machine. There are more detailed instructions
- Download ProgramD at
http://www.aitools.org/Downloads, getting the latest zip "Binary"
version (as of 2/23/07 it was 4.6). Save it in some directory where you will
keep all of these original downloads.
- Download the latest Java runtime (JRE) or SDK from
if you don't already have it installed.
- Download some AIML sets from
http://www.aitools.org/Free_AIML_sets. For starters, download the
zip versions of the "Standard" AIML and the A.L.I.C.E. AIML.
- If you are feeling adventurous, you could download the latest Annotated A.L.I.C.E.,
which is a far more complete personality. More info explaining the sets
is at http://www.alicebot.org/aiml/aaa/.
- Install Java, remembering where you put it.
- Set an environment variable for JAVA_HOME (Settings->Control
Panel->System->Advanced->Environment Variables->User variables) to the base
path of where Java is installed (e.g. C:\Progra~1\Java\jre1.5.0_04).
Note that you will probably have to use the 8.3 filename for any directories that
contain spaces, such as "Program Files," for things to work.
You can find out the 8.3 filename (dirname) by typing "dir /X" in a Windows
- Unzip the ProgramD files in a convenient, permanent location, such as
- Unzip each of the AIML sets you downloaded into the corresponding
directories in the "aiml" directory. After unzipping each one, rename the
subdirectory they are in to something short and meaningful, such as
"standard" and "alice".
- In the C:\ProgramD\conf directory, edit:
- bots.xml - uncomment any <learn> elements
that refer to AIML sets you installed, or create a new
<learn> element if there isn't
one for any of your downloaded AIML sets. If you chose the "aaa"
AIML set, only uncomment a <learn> element
for that, and not the others, to avoid funkiness.
- Try it but changing to the ProgramD bin directory and running the simple-console.bat
program. You should see a bunch of messages, ending with a [YourBot]
prompt. Type "/exit" to get out of it. If things don't work, check
the online instructions
Turning it into an AIM Chatbot
These instructions explain how to make your Chatbot accessible via AOL
Instant Messaging, assuming you have already followed the instructions above for
"Setting up a Local Chatbot."
- If you want your bot to have its own AOL instant messaging account, make sure to sign up for
Screen Name at AOL.
- Download the latest zip version of the AIM Listener for ProgramD from the
download page, saving the in your download directory.
- Unzip it to a temporary location.
- Copy the "jaimbot-lib-1.4.jar" file from the "lib" subdirectory into the
"lib/aim-listener" subdirectory of your Program D installation.
- Copy the "aim-listener.jar" file from the "distrib" subdirectory into
the "lib/aim-listener" subdirectory of your Program D installation.
- Open "conf/listeners.xml" from your Program D installation, and set the
AIM listener to enabled="true". Set the userid and password to the correct
values for the desired AIM account.
- Run ProgramD as before using the simple-console.bat program. Try
chatting to the chatbot using an AIM client.
Adding a Speech Interface
These instructions explain how to make your Chatbot communication using
speech, assuming you have already followed the instructions above for "Setting
up a Local Chatbot." This requires downloading a 30-day evaluation copy of a
Java Speech API, for which a license can be purchased for $16.
Extra First Setup
- Go back and download ProgramD version 4.5 at
getting the 4.5 zip "Binary" version, and install as you did 4.6. The
reason for this is that 4.5 comes preset with the Jetty web server, which
will make it easier initially to get up and running with the speech
interface. Make sure to download the AIML set(s) that you want, and
repeat any necessary setup steps as before.
- Download the latest zip version of
from the CloudGarden web site,
which is probably version 1.4.
- OPTIONAL: Purchase a license
from CloudGarden for $16 via their web site, clicking on the "Pricing &
Licensing" link. After purchase, you will receive an email with instructions
and the license key.
- Unzip alicetalker1.4.zip to a sensible directory, such as
- Install the license key, if your purchased it. You will do this using
the LicenseManager tool in the TalkingJava SDK, where you will enter in the
registration code and your email address.
- In the ProgramD directory, edit the chat.html file that is in
so that line 40 (probably) now looks like this, and save the file:
- Connect a microphone to your PC and make sure the volume is at a
reasonable level for the speakers.
- Change to the bin directory of ProgramD and run web-server.bat.
- Change to the AliceTalker directory, and run startAliceTalker.bat.
- Select the HTTP Connect Mode, and click the "Connect" button. Alice
Talker should speak and welcome you, or give you a useful error message.
- Click the "Mic is off" button, which will activate the microphone.
- Try talking to AliceTalker, typing as before, and see what happens!
Next Cool Steps
There are more cool things to do, that I haven't tried yet.
- Set up ProgramD to listen on a local port rather than as a web server,
so you could then use version 4.6. Get AliceTalker to communicate
directly to this port, rather than via the klunkier web server mechanism.
- Download the source code for these and import them into Eclipse projects
so we can modify and build them.
- Look at the AliceTalker source code, and figure out how to make a cooler
animated face (photograph of a person, a parrot, or something else).
- Think about how to make AliceTalker and ProgramD into a kiosk
application, with the idea to run them full screen on a small form factor
all-in-one computer and LCD display, as a demo for the hallway or various
- Figure out how to make the AliceTalker speech recognition work in as
speaker-independent of a way as possible.
- Create a cool and sassy personality for the demo version.
- Create a Java application driver that reduces the task of speech
recognition, looking for specific inputs rather than trying to do general
speech recognition. This could be an implementation of "guess my
number" or "21 questions" or some other interactive quiz where the speaker
has a limited range of acceptable responses.