Curent state of the PaMini Wrapper¶
Dependency changes if run in an RSB system¶
- xcf4j.jar needs to be replaced by xcf4j-rsb.jar (the wrapper library)
- RSB4Java.jar needs to added to the classpath to connect to RSB components
Important: No xcf4j.jar should be in the classpath, otherwise you will run into trouble.
- Currently, the changes for RSB are in a branch (branched from trunk at 10.06.2011), see:
All libraries except the PaMini rsb-enabled branch itself are openly available at: https://ci.cor-lab.org
Changes compared to PaMini trunk¶
- Except the additional support for RSBInputSources no further changes were needed, so far... ;-)
The following assumes that you checked out the PaMini branch to some folder as referenced above.
Demonstrated is a very basic dialog interaction where a human greeting is simulated and virtually answered by a robot via a text-to-speech action.
For this, the following steps are necessary:
Start RSB introspection¶
This is to get a glimpse on what happens without a robotic device. You can do so with one of the RSB introspection tools, in its simplest form with the following command:
swrede@x200t:/vol/cit/bin$ ./rsb_listener /isr/hyp
Next, you should see a message like the following on your terminal:
Listener setup finished. Waiting for messages on scope Scope[/isr/hyp/]
Start minimal dialog example¶
In the rsb-enabled branch, there is now a minimal example for the above scenario that use an RSBInputSource. You should be able to start it from the PaMini jar-File. The name of the class is:
See also the MinimalDialog example in the PaMini source and the corresponding configuration files in the resources folder.
By starting this Java process, you actually instantiate the Dialog framework in a configuration using RSB for getting data from the SpeechRecognizer in XML representation and XTT for issuing commands to the robotic system.
Simulate a speech recognition result¶
In the PaMini source, there is now also a valid output SpeechRecognition hypothesis. With this, you can easily simulate the speech recognition by sending the hypothesis XML document on the correct RSB Scope. In turn, it is received and processed by the dialog framework through the RSBInputSource.
You can achieve this as follows:
swrede@x200t:~/workspace/PaMini$ /vol/cit/bin/rsb_send /isr/hyp isr-greeting.xml
At the same time, the listener terminal window should show you the following output:
swrede@x200t:/vol/cit/bin$ ./rsb_listener /isr/hyp Listener setup finished. Waiting for messages on scope Scope[/isr/hyp/] <speech_hyp xmlns:bxml="http://www.sleepycat.com/2002/dbxml" xmlns:dbxml="http://www.sleepycat.com/2002/dbxml" generator="isr" origin="grm_track_xcf" stable="1" update="0" bxml:id="29"><TIMESTAMP>1290275288296</TIMESTAMP><seq> <part begin="330" end="630" id="0" type="word">hello</part> <score acoustic="362.48" combined="362.48" id="0" lm="0.00" /> <part begin="630" end="1030" id="1" type="word">robot</part> <score acoustic="602.56" combined="602.56" id="1" lm="0.00" /></seq><grammartree cancel="0" fault="0" skip="0"> <nonterminal name="$S"> <nonterminal name="Greeting"> <terminal refid="0" /> <nonterminal name="$RobotName"> <terminal refid="1" /> </nonterminal> </nonterminal> </nonterminal></grammartree><PersonHypothesis id="1" distance="150.0" azimuth="0.7853981633974483" zenith="1.5707963267948966" /></speech_hyp>
the dialog should process the event. You can easily see this by watching its debugging output. Somewhere in the output you should see a message like:
2011-06-11 20:46:02,646 [Thread-2] DEBUG de.unibi.agai.pamini.output.SpeechOutput - submit speech task: Dear Human! You know what: The answer is 42!
This is actually what this test case was about: Answering a human's greeting with a robotic speech act!
Please note, that this is just a very first prototypical testcase and will be explored in greater detail soon...