Important concepts in vxml

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.

 

DIfference between goto and subdialog tags

GOTO does the transition to another formitem/dialog/document.
But SUBDIALOG does the following.

  • It lets you submit a list of variables to the document server
  • It provides a RETURN statement to return to the source location.

 

Validation of VXML files

VXML files are validated against the vxml.dtd. This will check the vxml standards and syntax

 

Audio file formats in VXML

  1. 8bit, 8Khz, u-law Wave files (Riff Format)
  2. 16bit, 8Khz, PCM Wave files (Riff Format)
  3. 8bit, 8Khz, u-law Sphere files
  4. 16bit, 8Khz, PCM Sphere files

 

Recording and playback

The <record> element collects a recording from the user.The recording terminates when

  1. The interval of final silence occurs
  2. A DTMF key is pressed
  3. The maximum recording time is exceeded,
  4. The caller hangs up

A reference to the recorded audio is stored in the <record> variable, which can be played back.

 

Event handling in VXML

Incase the User doesnt respond in the required manner, An event can be thrown. The different types of events are 

  • <catch>
  • <error>
  • <help>
  • <noinput>
  • <nomatch>

 

Different types of transfers

There are 3 different types of transfers:

  • Blind :- (default). The platform redirects the caller to the callee without remaining in the connection, and does not monitor the outcome.
  • Bridge:-Bridge transfer. The platform adds the callee to the connection. Document interpretation suspends until the transferred call terminates. The platform remains in the connection for the duration of the transferred call.
  • Consultation :- The consultation transfer is similar to a blind transfer except that the outcome of the transfer call setup is known and the caller is not dropped as a result of an unsuccessful transfer attempt. When performing a consultation transfer, the platform monitors the progress of the transfer until the connection is established between caller and callee. If the connection cannot be established (e.g. no answer, line busy, etc.), the session remains active and returns control to the application. 

 

Usage of Barge-in and bargeintyppe

Bargein
 
Controls whether or not a user can interrupt the system. The property applies to both DTMF and spoken input. 
 

  • false - Disables the user's ability to interrupt queued prompts by speaking during audio playback.
  • true - Enables the user's ability to interrupt queued audio during audio playback.

 
Bargeintype
 
When bargein is enabled, this controls the type of bargein that will be performed in response to voice or DTMF input.
 

  • hotword - A prompt will continue playing until either a complete match of an active grammar is detected or there is no input during the time specified for the interpreter to listen for input.
  • speech - A prompt is stopped as soon as speech or DTMF input is detected, irrespective of whether the input matches a grammar.

 

when do we use block tag

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.

 

How to implement global grammars?

Add it in the Application Root.

 

Name the tags that use Namelist

<subdialog>, <submit>, <clear>, <exit> and/or <return>

 

Difference between submit and goto

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.

 

Significance of subdialog

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 and ASR

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.

 

Difference between src and srcexpr

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 

 

Different types of grammars

There are 3 types of grammars in VXML

  1. Inline        -   An inline grammar is a list of phrases and subgrammars included within the grammar
  2. External   - Specifying an URI that leads to a  file(.gsl/.grxml)  in the grammar's SRCEXPR attribute will help in using the external grammar. Advantage - reusability.
  3. Built -in   - Can be specified in the field attribute - TYPE. 

 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. 

 

Difference between audio and prompt tags

<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. 

 

More Questions

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. 

 
Tags: 

Quick Notes Finder Tags

Activities (1) advanced java (1) agile (3) App Servers (6) archived notes (2) Arrays (1) Best Practices (12) Best Practices (Design) (3) Best Practices (Java) (7) Best Practices (Java EE) (1) BigData (3) Chars & Encodings (6) coding problems (2) Collections (15) contests (3) Core Java (All) (55) course plan (2) Database (12) Design patterns (8) dev tools (3) downloads (2) eclipse (9) Essentials (1) examples (14) Exception (1) Exceptions (4) Exercise (1) exercises (6) Getting Started (18) Groovy (2) hadoop (4) hibernate (77) hibernate interview questions (6) History (1) Hot book (5) http monitoring (2) Inheritance (4) intellij (1) java 8 notes (4) Java 9 (1) Java Concepts (7) Java Core (9) java ee exercises (1) java ee interview questions (2) Java Elements (16) Java Environment (1) Java Features (4) java interview points (4) java interview questions (4) javajee initiatives (1) javajee thoughts (3) Java Performance (6) Java Programmer 1 (11) Java Programmer 2 (7) Javascript Frameworks (1) Java SE Professional (1) JPA 1 - Module (6) JPA 1 - Modules (1) JSP (1) Legacy Java (1) linked list (3) maven (1) Multithreading (16) NFR (1) No SQL (1) Object Oriented (9) OCPJP (4) OCPWCD (1) OOAD (3) Operators (4) Overloading (2) Overriding (2) Overviews (1) policies (1) programming (1) Quartz Scheduler (1) Quizzes (17) RabbitMQ (1) references (2) restful web service (3) Searching (1) security (10) Servlets (8) Servlets and JSP (31) Site Usage Guidelines (1) Sorting (1) source code management (1) spring (4) spring boot (3) Spring Examples (1) Spring Features (1) spring jpa (1) Stack (1) Streams & IO (3) Strings (11) SW Developer Tools (2) testing (1) troubleshooting (1) user interface (1) vxml (8) web services (1) Web Technologies (1) Web Technology Books (1) youtube (1)