voice-push.com

Pushing VoiceXML to the masses!



Home

Blog

VoiceXML
VoiceXML 2.0 & 2.1
VoiceXML 3.0
State Control XML
ASR & TTS
VoiceXML Applications

Video & VoiceXML
Video Apps

VUI vs. GUI
Client vs. Server Apps

Voice User Interfaces
DTMF vs. ASR
Target Audience
Dialog States
Global Commands
Zeroing Out
Personality
NLU vs. Directed Dialogs
Prompts - Wording
Prompts - Snippets
Prompts - Randomising
Prompts - Recording
Grammar Design
Waiting
Error Handling

Project Phases
User Requirements
Technical Spex
VUI Specifications
Development
Going Live!

Links

Contact

Dialog States

Dialog states are a useful concept when it comes to designing and documenting an application. Most applications can be broken up into states which consist of a question and answer. The question is composed of prompt snippets and the answer is the grammar for that question. A dialog state also has error and help prompts which are relevant to the question being asked. Each dialog state can link to other dialog states and this can be drawn in a dialog state diagram.

Here’s an example of a very simple dialog state, which uses escalating error prompts.

File Name Prompt
horo_select_init_1.wav Which star sign would you like?
horo_select_init_2.wav Please choose a star sign!
horo_select_init_3.wav Please say a star sign!
horo_select_err1.wav Please say the name of a star sign, such as Cancer.
horo_select_err2.wav If you want to hear the horoscope for a star sign, say the name of the star sign. To return to the main menu, say main menu.
horo_select_help.wav You are about to select a star sign so that you can hear its horoscope. You can do this by saying the name of a star sign - for instance Cancer. If however you want to return to the main menu, just say main menu. For which star sign would you like to hear the horoscope?

A word about the naming of the prompts. The scheme that we use is as follows:

<application name>_<dialog state>_<prompt type>

So in the example above, the application name is horo for horoscope, the dialog state is select for selecting a star sign and the type of prompts are initial (init), help, and error.

If the caller says nothing, then the first time through the initial prompt is repeated. If they say nothing a second time, then you can play the help prompt. You may want to distinguish between sequential errors and total errors. A caller might say nothing, then say something that is misunderstood and then say nothing again. VoiceXML keeps a count on the total number of errors - but not the sequential errors. If you want to keep track of the sequential errors then you'll need your own counters.

So a typical dialog state would look like this:

<form id="Horo_Select">
  <field name="Horo_Select">
  
    <prompt>
      <audio expr="getHoroInit(Audio)"> 
        <value expr="getHoroInit(TTS)"/> 
      </audio>
    </prompt>
    
    <help>
      <prompt>
        <audio src="horo_select_help.wav"> 
          If you want to hear the horoscope for a star sign, 
          say the name of the star sign.  
          To return to the main menu, say main menu.
        </audio>
      </prompt>
    </help>
    
    <noinput count="1">
      <reprompt/>
    </noinput>
    <noinput count="2">
      <throw event="help">
    </noinput>
    <noinput count="4">
        <audio expr="getReturnToMainMenu(Audio)"> 
          <value expr="getReturnToMainMenu(TTS)"/> 
        </audio>
      <goto next="#MainMenu"/>
    </noinput>
    
    <nomatch count="1">
        <audio expr="getSorry(Audio)"> 
          <value expr="getSorry(TTS)"/> 
        </audio>
        <audio expr="getFailedRecognition(Audio)"> 
          <value expr="getFailedRecognition(TTS)"/> 
        </audio>
      <reprompt/>
    </nomatch>
    <nomatch count="2">
      <prompt>
        <audio expr="getSorry(Audio)"> 
          <value expr="getSorry(TTS)"/> 
        </audio>
        <audio expr="getFailedRecognition(Audio)"> 
          <value expr="getFailedRecognition(TTS)"/> 
        </audio>
        <audio src="horo_select_err1.wav"> 
          Please say the name of a star sign, such as Cancer.
        </audio>
      </prompt>
      <reprompt/>
    </nomatch>
    <nomatch count="3">
      <prompt>
        <audio expr="getSorry(Audio)"> 
          <value expr="getSorry(TTS)"/> 
        </audio>
        <audio expr="getFailedRecognition(Audio)"> 
          <value expr="getFailedRecognition(TTS)"/> 
        </audio>
        <audio src="horo_select_err2.wav"> 
          If you want to hear the horoscope for a star sign, 
          say the name of the star sign.  
          To return to the main menu, say main menu.        
        </audio>
      </prompt>
      <reprompt/>
    </nomatch>
    <nomatch count="4">
        <audio expr="getSorry(Audio)"> 
          <value expr="getSorry(TTS)"/> 
        </audio>
        <audio expr="getFailedRecognition(Audio)"> 
          <value expr="getFailedRecognition(TTS)"/> 
        </audio>
        <audio expr="getReturnToMainMenu(Audio)"> 
          <value expr="getReturnToMainMenu(TTS)"/> 
        </audio>
      <goto next="#MainMenu"/>
    </nomatch>
    
    <filled>
      <!-- Read out the horoscope -->
    </filled>
    
  </field>
</form>

If the getHoroInit throws you, then take a look at randomising prompts. There are three initial prompts and they are randomised to make the user interface less mechanical and repetitive sounding. Further prompts that are randomised in this example are the prompts for "Sorry, I didn't understand that" (getSorry & getFailedRecognition), as well as the prompt to tell the caller that seeing as they are having difficulty with the application they will be brought back to the main menu again (getReturnToMainMenu).

If the caller says nothing more than three times, they return to the main menu. The same thing happens if they are misrecognised more than 3 times. On the first <nomatch> they just hear them main prompt again. Later errors produce more detailed prompts.

Although by no means perfect, this short example should give you a feel for how to order and structure your dialogs. As is clear in the example, the system is nearly always the same and there is nothing to stop a copy and paste approach to writing dialog states.



If you have any comments, ideas, issues, etc. about this topic why not try the voice-push forums






© voice-push.com