Start a conversation with Dalv2000 Robot
The applet on this page demonstrates how to have a formal conversation with a machine. Your computer simulates a dialog partner: it listens to your words, it analyses them and it gives you back its considerate answer.
After the java applet is fully loaded, a Start button should appear in the top of the window indicating you to start the conversation. If everything was successfully loaded and configurated, the Robot's behaviour should be as follows: after pressing the Start button, the Robot will load itself in the memory, for about few seconds. After that, it will step into the listening state (you may now say something in the microphone, according to the Robot's knowledge-base). If the robot understands your spoken words, it searches for the right answer and it will pronounce it. However, everything the robot "hears" and "speakes" will be also displayed as a text on the applet's drawing area. Below I present you the Robot's knowledge-base (I know it's little but hey,this is only a demonstration :-)
(Good morning | Hello | How are you | What is | Who is) (Computer | Today | Your name | Your master)
Concatenate words from first group with words from second group. Some examples of expressions you may speak:
"Good morning computer"
"What is your name"
"How are you today"
-
Standard audio card, with attached
speakers
and microphone
-
512 MB of System RAM
-
Web Browser like Internet Explorer
or Mozilla familly
-
Java Runtime Environement
(see below)
If the applet doesn't work at all, and you are sure that Java is enabled in your browser, chances are that the applet simply did run out of memory. The default memory limit of 64 MBytes used for Java applets is a bit low when running text-to-speech output, because the speech dictionary, phoneme data, and audio sample buffer are all pretty large. Please check the Configuration section below (at step 3) for information about increasing the memory limit; a value of 384 MBytes should be fine (or 256MB on some browsers).
If the applet starts ok and the animation works when running the applet,
but you can't hear the speech output, you have probably not yet changed the security
settings of your browser's Java virtual machine. The speech synthesis in FreeTTS
relies on a few operations (audio output, but also property accesses etc.) that
are forbidden for untrusted applets. Therefore, to really run this applet with speech-output
and speech recognition enabled, you might have to edit your Java security configuration file. Please check the Configuration section below (at step 2) which helps
you to edit the security settings.
If audio output still does not work on your system, please also check the following:
-
check that audio functions are enabled by your operating system.
-
check volume controls and speaker/headphone cables.
1. Make sure there is Java Runtime Environment installed
on your machine.
Tip:
You may get information about your active JRE by
clicking here .
If a JRE is installed on your machine, some information will be displayed. Check near java version field and remember the number (there should be something like "1.6.0").
For best performance I recommend using the latest JRE available
at this moment (JRE 6 Update 11) available here:
http://java.sun.com/javase/downloads/index.jsp
2. Set java security policy
2.1
Download
talkRobot.policy file and copy it somewhere, for example to C:\
2.2
Apply this policy file to your active JRE machine for the current browser.
Go to your JRE root directory (JAVA_HOME): usually,
it is inside C:\Program Files\Java in your Windows system. Go here: [java_home]\lib\security. (For example C:\Program Files\Java\jre1.6.0\lib\security).
Open the java.security file using a text editor (for example Notepad) and locate the lines starting with
policy.url. Note there is a number after each of them, something like:
policy.url.1=[some dir]
policy.url.2=[some dir]
After the last line, add this line: policy.url.3=file:/C:/talkRobot.policy (assuming C:\ is the directory where you have copied the file at step 2.1). Save your changes and close the file java.security. You have now applied the applet policy and the Robot has the needed privileges on your system.
3. Increase java heap memory. Because this applet implements memory-consumption systems like speech recognition system, text to speech system, knowlege base accessing system etc. it uses much RAM memory. So the default java heap memory must be increased. In order to do that, go to Control Panel>Java, select the Java tab and press the View button from the Java Applet Runtime Settings. A new window will pop-up having all the installed JREs displayed. Locate your selected JRE (for example 1.6.0) and edit the Java Runtime Parameters field; type -Xmx384m , save and close the window. You have now allocated a maximum of 384 MB RAM for your JRE when running applets. The tutorial here might be useful too.
4. Select the microphone as you input recording line. Go to Control Panel > Sounds and Audio Devices . Press the Advanced button on Volume tab. This will pop-up your audio mixer. Select Options>Properties. Select Adjust Volume for Recording and press OK. Check the Microphone column and activate the Select check. You may also want to control your microphone volume if the robot will not react at your voice. To go back to Playback mixer, follow the same steps: click Options>Properties and then Adjust Volume for Playback.
Congratulations! You are now able to run the applet. Enjoy!
This program stands according to j2me.info licence. Please read our disclaimer and terms of use here.
Note: This program integrates FreeTTS and Sphinx4 engines.
If you liked this project don't forget to visit us again at Robotics.j2me.info and check for new projects added. You may also comment about this project on our forum at Forum.j2me.info . Enjoy!