Engineering Full Stack Apps with Java and JavaScript
These are some of the frequently asked questions during VXML interviews. Most questions here are copied from our initial vxml website (vxmlfaq.com) FAQ page compiled mainly by Sheeba. This page will also contain user submissions which might not be verified in all cases; hence if you find any mistake or issues with the answers, please do contact us and we will make necessary changes.
GOTO does the transition to another formitem/dialog/document.
But SUBDIALOG does the following.
VXML files are validated against the vxml.dtd. This will check the vxml standards and syntax
The <record> element collects a recording from the user.The recording terminates when
A reference to the recorded audio is stored in the <record> variable, which can be played back.
Incase the User doesnt respond in the required manner, An event can be thrown. The different types of events are
There are 3 different types of transfers:
Bargein
Controls whether or not a user can interrupt the system. The property applies to both DTMF and spoken input.
Bargeintype
When bargein is enabled, this controls the type of bargein that will be performed in response to voice or DTMF input.
Block contains a set of directives to be executed in the document source order. It normally contains welcome or info messages and/or variable declarations/assignments.Blocks are typically executed just once per form invocation.
Add it in the Application Root.
<subdialog>, <submit>, <clear>, <exit> and/or <return>
Submit lets you to submit a list of variables to the document server via an HTTP GET or POST request while GOTO just does the transition to another document/dialog/form item.
The subdialog element allows you to call a self-contained VoiceXML dialog. In addition to passing parameters to the called dialog via param elements, the called dialog can return values to the caller via the return element. You should always include the return element in the dialog called by the subdialog element to properly return to the execution context of the caller.
Just before the subdialog is executed the VoiceXML interpreter suspends the execution context of the caller including all event handlers, grammars, links, scripts, and variables in any scope (dialog, document, application). The VoiceXML interpreter creates a new execution context for the subdialog while it executes. This context is destroyed when the subdialog returns.
TTS - Text To Speech
TTS enables the “reading” of a variety of dynamic sources – databases, e-mail programs, news reports, SMS, prompts – and converts it into natural-, human-sounding speech output, ideal for dynamic and rapidly changing content.
ASR - Automatic Speech Recognition
ASR is used for building speech-driven user interfaces and provides an efficient and intuitive spoken alternative to touch-tone (DTMF) applications.
The attributes src and srcexpr needs to be used to transfer control from the source document to the destination document.
src
The URI of the document (or anchor within the current document)
srcexpr
An ECMAScript expression that evaluates to the URI
There are 3 types of grammars in VXML
Please find a few examples below:
boolean
The DTMF digits 1 and 2 are supported for yes and no. The result is an ECMAScript true or false.
currency
Defines a field that expects a currency amount from the user.
date
Defines a field that expects a date including month, day, and year from the user.
digits
Defines a field that expects one or more individual digits (0-9) from the user.
number
Defines a field that expects a number from the user.
phone
Defines a field that expects a phone number from the user.
time
Defines a field that expects the time including hours and optionally minutes, and AM or PM.
<AUDIO> - The audio element plays back a pre-recorded audio file or text that's synthesized using a Text-To-Speech (TTS) engine.
If the src or expr attribute points to a valid audio file, any text specified within the audio element is ignored. If the audio file cannot be retrieved, the specified text is synthesized and played to the user.
<PROMPT> - The prompt element prompts the user for input by queueing the <AUDIO> elements and text that it contains.
Difference between form and menu
Difference between VoiceXML 2.0 and 2.1
If you were asked a different question, please share it with us and help others.