Creating the Dialog Framework

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

This is the third of seven tutorial topics covering tools in Speech Server. This section of the tutorial uses Speech Control Editor, which is the all-purpose tool for assembling a Web-based voice response application in Microsoft Visual Studio 2005. Speech Control Editor manipulates ASP.NET Speech Controls that produce Speech Application Language Tags (SALT) and JScript on the client. Developers use Speech Control Editor to specify prompts to speak to the user, to recognize answers using grammars, and to confirm the answers.

For reference information about Speech Prompt Editor, see Develop Prompts with Speech Prompt Tools. For specific information about QA controls, see Speech Controls in SALT Voice Response Application Projects. In addition, Design Dialog Flow contains guidelines for designing voice-only applications.

This sequence of tutorials demonstrates how to build a simple voice response application using Speech Server. Specifically, the tutorials demonstrate building a Start page of an imaginary pizza ordering service for use by a telephony SALT client.

The procedures for creating the pizza ordering service application build on each other. Performing the procedures in sequence is therefore important.

Adding Prompts to the Pizza Order Application

Speech QA controls prompt callers for information and can recognize the callers' responses. Properties on the QA control also assign information to semantic items for use in responding to the recognized responses. This section of the tutorial creates the basic dialog structure for the application using a series of QA controls. This structure processes the caller's speech while ordering a pizza. When this section is complete, it is possible to check the dialog flow through the application, using speakers or headset and a microphone. This application uses a system-initiative dialog. In this type of dialog, the QA controls have prompts that try to constrain the caller's responses and the controls extract only one type of answer.

At this point, the dialog flow uses the text-to-speech (TTS) voice. The next section of the tutorial adds recorded prompts and a later section adds the semantic information.

Adding QA Controls to the Form

The QA controls go on the form in the Default.aspx page of the application. The WelcomeQA control goes directly onto the design surface, but the rest of the QA controls are contained in an ASPX panel. The panel serves to provide a scope for those controls. A Command control that will be added later uses this scope. Because users do not know about the commands available to them until the welcoming prompt has played and enumerated the commands, WelcomeQA should remain outside the scope of the Command control.

Because this is a voice-only application, when the Web-based Voice Response Application Project Wizard set up the project, it added an AnswerCall control to Default.aspx. This application uses that control, but it is not necessary to modify it in any way for this application. It also added a SemanticMap control, which the tutorial modifies later.

To add the WelcomeQA control

  1. In Solution Explorer, double-click Default.aspx to display it in the design window.

  2. If necessary, click the Design tab at the bottom of the window to display the design surface.

  3. In the Toolbox, click the Speech tab, and then drag and drop a QA control onto the design canvas.

  4. On the context menu that appears, click Property Builder.

  5. In the General section, replace the existing ID with WelcomeQA in the ID box.

  6. Clear the AllowCommands check box.

    This choice specifies that the application does not allow a Command control to be active simultaneously with this control. At a later stage, the tutorial adds a Command control to end the application, but that control should not be active during the introductory prompt, in which callers get information about the commands that they can use.

  7. In the tree view pane on the left, select Voice Output.

  8. Click PlayOnce.

    This selection specifies that the application plays this prompt only once when the caller first calls. Later in the tutorial, as a part of the confirmation strategy, you will clear this setting for some of the QA controls.

  9. Select Inline Prompt, and then copy and paste the following text into the edit box:

    Welcome to Tony's Pizza. Order a pizza now and we'll have it waiting when you arrive. Say Cancel at any time to cancel this order.

    This is the prompt that the application plays when it starts.

  10. Click OK.

    The blue sound wave icon on the control now shows that it has a prompt associated with it.

To add a Panel control

  1. In the Toolbox, click the Standard tab, and then drag and drop a Panel control onto the design canvas.

  2. On the Properties pane, change the default ID to PizzaPanel.

  3. Stretch the panel to hold four controls.

All the remaining QA controls in this application go into the panel to put them into the same scope.

To add the SizeQA control

  1. In the Toolbox, click the Speech tab, and then drag and drop a QA control onto the Panel control on the design canvas.

  2. On the context menu that appears, click Property Builder.

  3. In the General section, replace the existing ID with SizeQA in the ID box.

  4. Select Voice Output.

  5. Click PlayOnce.

  6. Select Inline Prompt, and then copy and paste the following text into the edit box:

    We have small, medium and large sizes. What size would you like?

    This is the prompt that the application plays when this control is active.

  7. Click OK.

To add the Phone and ThanksQA controls

  1. Drag two more QA controls onto the Panel control.

  2. Set their properties as listed in the following table.

    Control Property Value

    PhoneQA

    ID

    PhoneQA

    PhoneQA

    PlayOnce

    true

    PhoneQA

    InlinePrompts

    Please say your telephone number, area code first.

    ThanksQA

    ID

    ThanksQA

    ThanksQA

    PlayOnce

    true

    ThanksQA

    InlinePrompts

    Thanks for your order. Give us your phone number when you arrive and we'll give you your pizza.

It is now possible to check the dialog flow with the Voice Response Debugging Window dialog box.

To check the prompts

  1. On the Build menu, click Build Solution.

  2. On the Debug menu, click Windows, and then click Voice Response Debugging Window.

    Note

    The tutorial covers further use of the Voice Response Debugging Window dialog box in Debugging the Tutorial Application.

  3. On the SIP Phone Simulator tab, accept the default numbers in Called Party and Calling Party boxes.

    These numbers represent telephone numbers, and the tutorial application has no provision for recognizing these numbers or switching based on these numbers.

  4. Click Call.

    The Voice Response Debugging Window dialog box displays the Call Control tab, with SALT markup. Through your headset or speakers, the application replays the prompts in all the QA controls, one after the other.

    At this stage, the application uses text-to-speech (TTS) synthesis to play the prompts. The Call History tab shows the SALT markup and the prompts that were played.

  5. In the Voice Response Debugging Window dialog box, click the SIP Phone Simulator tab, and then click Hang Up.

Although the synthesized voice was probably acceptable, the next section of the tutorial covers recording prompts to get more natural speech.

To See

Go to the next step

Creating Prompts

Start from the beginning

Creating a Speech Project

Get more information about Speech Control Editor

Develop Prompts with Speech Prompt Tools

Get more information about working with QA controls

Speech Controls in SALT Voice Response Application Projects

Get more information about designing dialog flow

Design Dialog Flow