Udostępnij za pośrednictwem


ConversationalUnderstanding (Managed Code Sample)

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.

The ConversationalUnderstanding sample demonstrates the use of concept understanding features to enable callers to speak more naturally. After the sample plays a welcome message, it prompts the caller with a general "How may I help you?" The application can handle four types of requests (or concepts): account balance, make a payment, report a payment, and discuss my account. The caller does not need to say any of these four selection choices exactly. Valid input can take a form such as, "hmm, I need to, hmm know the balance, yes, the balance for my account."

After the caller speaks the request, the sample confirms what it heard and asks for the caller's account number. A valid account number is a U.S. telephone number with 10 digits (a three-digit area code and a seven-digit local number). After the sample confirms the telephone number, it branches into the appropriate application functionality and plays a "Transferring to" prompt. After this, the sample hangs up.

  • Using conversational grammars
  • Using concept understanding to find the meaning of an input sentence
  • Embedding keyword recognition within a conversational grammar
  • Making use of the recognized concept to perform call routing
  • Making use of dynamic prompts
  • Creating custom "get and confirm" stages
  • Routing a call based on a caller's input

Running the Sample

To run the sample

  1. In the Samples\Workflow\ConversationalUnderstanding\ directory of the Speech Server installation directory, open the sample solution file.

    Note

    ConversationalUnderstanding.gbuilder fails to open if Grammar Builder is unable to find Cmnrules.cfg. ConversationalUnderstanding.gbuilder assumes that the path to Cmnrules.cfg is C:\Inetpub\wwwroot\aspnet_speech\v2.0.3400.0\client_script\1033\cmnrules.cfg. If Cmnrules.cfg is not at this location, open ConversationalUnderstanding.gbuilder in a text editor and search for the opening RefURI tag. Edit the contents of this tag as necessary to specify the location of Cmnrules.cfg.

  2. To start debugging, press F5.

  3. In the Voice Response Debugging Window dialog box, click the SIP Phone tab, enter any numbers in the Called Party and Calling Party boxes, and then click Call.

  4. When the prompt "How may I help you?" plays, follow the script that is described in the preceding introduction.

  5. After each prompt plays, click Start Recording, and then speak your response.

  6. When the recognized result appears in the Keyword Values box, click Submit.

    The application repeats your choice and asks you to confirm it.

  7. Click Start Recording, and then say "yes."

  8. When your response appears in the Keyword Values box, click Submit.

    The application asks you for your account number.

  9. Click Start Recording, and then say any 10-digit U.S. telephone number.

  10. When the recognized telephone number appears in the Keyword Values box, click Submit.

    The application repeats the telephone number it recognized and then asks you to confirm it.

  11. Click Start Recording, and then say "yes."

  12. When the recognized result appears in the Keyword Values box, click Submit.

    The application transfers the call as directed and exits.

Remarks

This code sample is intended to demonstrate specific Speech Server features. It does not necessarily reflect best practices with respect to security and privacy. You should carefully review any code that you deploy in production for potential security risks and privacy issues.