The best place to get started is the VoiceXML tutorials and documentation.
There are plenty of online resources. You might find these ones helpful:
(Mind that tags and attrs starting with "bevocal:" will not be implemented in vxmlsurfer)
While we try our best to follow the VXML 2.0 specifications we are not quite there yet. :)
Not every tag has been implemented, but what we already have should be enough for your purposes.
For example <menu> and <grammar> tags are not yet implemented. But you can use <form> instead of <menu>
You can find simple Java examples (that definitely work!) in the "./src/examples" folder.
The corresponding vxml dialogs are in the: “./examples/” directory
Make sure that you allocate enough memory for you jvm: Eclipse menu: run->run->arguments tab-> set VM arguments to “-Xmx256m”.
If examples are using Sphinx recognizer – they will also take awhile to load...
You can find a few more vxml dialogs in the "vxmlsurfer/resources/dialogs/"
To see the complete listing of (un)implemented tags, please see the color-coded table. You can read a little more about the vxmlSurfer
VXMLSurfer has several different modes of operation. It can run with or without text-to-speech engine,
speech recognizer, or Audio Player. It can run in the console or use an enlarged input box.
Mind that the console version can't handle shortcuts.
You will probably want to use a fully-featured version that includes all options.
Once you have initialized the interpreter and chose the appropriate mode,
you can run VXMLSurfer in two different ways: blocking or non-blocking.
Blocking call is just a method call, e.g.: processor.Run("dialog.vxml");
that will not return until the VXML dialog processing is complete and the method returns.
In a non-blocking mode, the vxmlSurfer is started as a separate Java thread.
The communication between your program and the vxmlSurfer is done through
observer-observable pattern, when they send messages to each other.
This requires a little more programming logic on your side of the application.
All keyboard shortcuts are treated as events within the vxmlSurfer.
You can provide your own event names and event handlers.
You can both <catch> and <throw> events.
This file describes all possible key combinations you can use to catch key events: “./vxmlsurfer/resources/events/keys/KEYS.txt”
All vxml default handlers are stored in: ./vxmlsurfer/resources/events/
All files in that directory are traversed and are loaded as default event handlers.
You can provide your own handlers by adding vxml files to that directory.
You can also add vxml handlers to your vxml dialogs - scoping of event handlers is in effect.
Some events can't be processed in the vxmlDialog. Handlers for such events are hardcoded in the Java method:
public void runHandler(String handler) implemented in “./src/vxmlsurfer/Processor.java”
This file lists all hardcoded events:
The corresponding handlers are defined in “./vxmlsurfer/processor.java” -> runHandler(String handler)
You can add your own handlers to this file and throw the corresponding events in vxml dialogs:
e.g. <throw event="$REPEAT"> to repeat the last utterance.
If you are using a non-blocking mode, you can send a message from your vxml dialog to your application as:
<throw event="$SEND_MESSAGE" message="msg">
You can attach your own FreeTTS text-to-speech engine or your own voices.
You can add another voice to FreeTTS “./src/vxmlsurfer/processor.java” -> allocateVoice()
You can attach your own Sphinx recognizer or Sphinx modules – you know better how to do it. ;)
We use a grammar model, with the grammar defined in “./src/vxmlsurfer/voiceRecognizer/hear.gram”
All of the settings are in “./src/vxmlsurfer/voiceRecognizer/voiceRecognizerConfig.xml”
“vxmlsurfer/voiceRecognizer/VoiceRecognizer.java” controls the Sphinx recorder.
We have attached an unpacked Sphinx project to the vxmlsurfer.
So, you will have to download and import both projects into eclipse.
Please disregard the error messages coming from Sphinx. (Let me know if you know how to get rid of them).
Because the accuracy of recognition depends on many factors,
we just paste the recognized text into the input window: VoiceRecognizer.java: “InputWindow.getInstance(null).setText(resultText);”
We were unable to get the recognition confidence score while using the grammar model.
We would love to hear from you if you find a way use confidence score or improve recognition.
Once the recognized text is pasted in the input window you can either try again
or hit enter to accept the input. You have to keep in mind that if you don't have a decent microphone,
Sphinx will try to recognize any noise as speech.
Therefore, we have provided shortcuts Alt+A and Alt+Z to turn the recording on/off respectively.
You can also use the corresponding hardcoded event handlers:
$RESUME_RECORDING and $SUSPEND_RECORDING to use in your dialogs
enabling and disabling the recognition where necessary.
If you want to give it a try, you can uncomment the line:
and the results should go directly into the input queue.
You can utilize logging feature for debugging purposes in both your code and the code of the vxmlsurfer,
by using the singleton class ./src/util/ProgressLogger.java.
See how to use logging here look for a properties file in “./vxmlsurfer/resources/settings/” directory
to change the logging level the logs will be saved to the "log" directory.
You can also use <log> tag in your vxml dialogs –
the logs will be saved to the same location using the "info" logging level.
Any updates and bug fixes to the vxmlSurfer will appear on the downloads page
Because vxmlsurfer is in pre-alfa state, we cannot guarantee that everything will work as we promise,
However, we’ll be happy to fix the problem right away if you discover one. ;)
-If you have any questions concerning vxmlSurfer that are not covered in the documentation, or
-If you have any suggestions on how to improve the Interface, APIs, Docs, Architecture, etc., or
-If you are a programming guru and you feel like you can contribute to this project, or
-If you find any bugs and want to report them,
-If you are not just stuck with Java programming
don't hesitate to contact Eugene Borodin
You are welcome and are encouraged to submit bug fixes along with bug reports.