I am working with the Sphinx4 AVR/IVR recognizer written entirely in Java. In a command and control demo, called "Dialog Demo" we have to create our own command scripts so the program actually does something. Here is their commentary:
Quote:
When the program runs, you will be presented with a menu of commands that can be spoken. Here is a sample run. The spoken commands are highlighed in green. Note that this is just a demonstration of the speech technology. This demo will not actually perform the command. Thus, when you say "play games / play adventure " no game will actually played, similarly, when you say "make a phone call / call paul" no phone call will be made.
Note - when browsing newspapers from the 'news' menu, this demo will actually attempt to open the news page in your web browser by executing the command 'browse web-page-url'. If you want to enable this feature place a browse script in your command path. The script I use with the firefox browser is this:
|
Code:
#!/bin/sh
export FF_HOME="/usr/share/firefox
url="$1"
if [ "x$url" = "x" ]; then
url="about:blank"
fi
if $FF_HOME/mozilla-xremote-client openURL\("$url"\); then
exit 0
fi
exec $FF_HOME/firefox "$url"
If you surmised I am a newb to programming you are correct. I know how to write a bash script, but I have no idea how this implementation works, where this script should go, what "command path" actually means, etc. I see that Java calls for "system" but I have no handle on that. I am still at "Hello World" with Java.
And how does one find the commands to start and manipulate various programs and utilities--easily? I come across them in tutorials or Google to find them, but I have not seen any systematic way of locating them.
I am just asking for pointers since I really need to learn all this myself.
Any help is much appreciated.