MSDN Magazine - April 2008 - (Page 62) was evaluated simply on keywords, it might Handling Responses be recognized as an inquiry for a new loan, Now that your application can talk and liswhen really the user is trying to make a payten, you need to get the results of what your ment on their account, which probably reuser said. To get these results via your code, sides as a secondary menu choice under you employ the RecognitionResult property AccountInformation. of the QuestionAnswer activity. You can reThe Answer Examples pane is where you trieve the exact phrase the user said via the can add phrases that a user is likely to say. Text property: this.questionAnswerActivity.RecognitionResults.Text; You’ll need an example phrase for each of the defined concepts. In the Representative If the user were to respond, “I need to talk to node, you might have a list of the followa person,” the Text property of the recogniing phrases: tion results would contain “I need to talk to • “I need to talk to a person.” a person.” How does your app know that the • “Can I speak with someone?” phrase means that they want to speak with a • “I’d like to talk with a representative.” representative? This is where Semantic values Next, you need to consider the use of key- Figure 5 Debugging Window come into play. Your app doesn’t care whether words, not for recognition, but to expand the the user said, “I need to talk to a person” or Answer Examples phrases that you’ve entered. Notice that words “Can I speak with someone?” It only needs to know that they want person, someone, and representative all refer to the same object, a to speak with a representative. representative. What if the user says “I need to talk to a represenInstead of the Text property, you can use the SemanticResult tative”? Instead of creating three different sentences for each An- property and provide a key value. In this case, the Concept Answer Example, you can create keywords so the sentences are more swer name, MainMenu, is the key value: dynamic. The use of keywords is not necessary when using a Conthis.questionAnswerActivity.RecognitionResults.Semantics[ “MainMenu”].Value.ToString(); cept node in your conversational grammar, but it will save you time This code would return the name of the Concept. In the case when developing the answer phrases. Figure 4 shows how we have of the user saying, “Can I speak with someone?,” it would return consolidated three phrases into one phrase by using keywords. In the Keywords area of the Conversational Grammar Builder, “Representative.” You have retrieved the results, but now you need to do someyou’ll need a keyword container that corresponds with the Representative node under Answers. In this case, I called it Representa- thing with those results. Typically in Voice Response Applications tiveKeys. Under this node, you might want to have a keyword for you’ll want to create branches, representing each of the possible Person, and in the Keyword Phrase area you add words or phrases choices. If you referenced the grammar via Visual Studio you can that fall under the main keyword. For example, the Person keyword right-click on the QuestionAnswer activity and choose Genermight have a list of words which a user might use to describe a rep- ate Branching. This will automatically create each of the branches and create the criteria for each branch. Alternatively, you can creresentative, including person, representative, and someone. The goal of the keyword is not to distinguish the between these ate each branch yourself and set the criteria regarding when the words, but a list of words that a user might use to describe a rep- user will enter the branch based on the recognition results. For resentative. If the application needs to determine the difference example, from the MainMenu you might have a Representative between the words person and representative, each would be an branch, which would transfer the user to a representative upon successful recognition. additional keyword container node under Keywords. Now on the Representative concept node you can reference the RepresentativeKeys keyword node, and then click on the Parse but- Debugging and Testing Voice Response Workflow applications give you the same debugton. This will replace the keywords found in the concept phrases and replace them with brackets indicating that the word isn’t static, ging experience you are already accustomed to. Unlike most other but a variable belonging to the referenced keyword. A green check- applications, however, you need to be able to hear and speak to an mark indicates that a keyword is being used in a phrase, while a IVR application. Speech Server adds a Voice Response Debugging red “x” indicates that no keywords are being used. For concept type Window into Visual Studio, as shown in Figure 5. This debugging phone lets you test your app without actually grammars, keywords are not required, so it’s acceptable and very deploying it or even having any telephone lines connected. You likely that the phrases may not reference any keywords. You can reference the completed grammar in a QuestionAnswer can test your grammars using a microphone or simply enter the activity or any other activity that accepts user input. This can be text you want the app to test its grammars against. While it seems done through the Visual Studio environment or from your code- like a simple feature, most other IVR platforms overlook the ability beside. Like prompts, if you set grammar via your code and not to test and debug without deploying. To learn more about Speech through Visual Studio, keep in mind the order of event execution; Server 2007 and download the tools, see the Microsoft Speech Technologies site at microsoft.com/uc/products/speechserver.mspx. ■ you don’t need to repeatedly set the grammar. 62 msdnmagazine Voice Response Workflows http://microsoft.com/uc/products/speechserver.mspx
Table of Contents Feed for the Digital Edition of MSDN Magazine - April 2008 MSDN Magazine - April 2008 Contents Toolbox CLR Inside Out Basic Instincts Cutting Edge Foundations Test Run Service Station Windows with C++ Going Places { End Bracket } MSDN Magazine - April 2008 MSDN Magazine - April 2008 - (Page Intro) MSDN Magazine - April 2008 - Contents (Page Cover1) MSDN Magazine - April 2008 - Contents (Page Cover2) MSDN Magazine - April 2008 - Contents (Page 1) MSDN Magazine - April 2008 - Contents (Page 2) MSDN Magazine - April 2008 - Contents (Page 3) MSDN Magazine - April 2008 - Contents (Page 4) MSDN Magazine - April 2008 - Contents (Page 5) MSDN Magazine - April 2008 - Contents (Page 6) MSDN Magazine - April 2008 - Contents (Page 7) MSDN Magazine - April 2008 - Contents (Page 8) MSDN Magazine - April 2008 - Contents (Page 9) MSDN Magazine - April 2008 - Contents (Page 10) MSDN Magazine - April 2008 - Toolbox (Page 11) MSDN Magazine - April 2008 - Toolbox (Page 12) MSDN Magazine - April 2008 - Toolbox (Page 13) MSDN Magazine - April 2008 - Toolbox (Page 14) MSDN Magazine - April 2008 - Toolbox (Page 15) MSDN Magazine - April 2008 - Toolbox (Page 16) MSDN Magazine - April 2008 - CLR Inside Out (Page 17) MSDN Magazine - April 2008 - CLR Inside Out (Page 18) MSDN Magazine - April 2008 - CLR Inside Out (Page 19) MSDN Magazine - April 2008 - CLR Inside Out (Page 20) MSDN Magazine - April 2008 - CLR Inside Out (Page 21) MSDN Magazine - April 2008 - CLR Inside Out (Page 22) MSDN Magazine - April 2008 - CLR Inside Out (Page 23) MSDN Magazine - April 2008 - CLR Inside Out (Page 24) MSDN Magazine - April 2008 - Basic Instincts (Page 25) MSDN Magazine - April 2008 - Basic Instincts (Page 26) MSDN Magazine - April 2008 - Basic Instincts (Page 27) MSDN Magazine - April 2008 - Basic Instincts (Page 28) MSDN Magazine - April 2008 - Basic Instincts (Page 29) MSDN Magazine - April 2008 - Basic Instincts (Page 30) MSDN Magazine - April 2008 - Basic Instincts (Page 31) MSDN Magazine - April 2008 - Basic Instincts (Page 32) MSDN Magazine - April 2008 - Basic Instincts (Page 33) MSDN Magazine - April 2008 - Basic Instincts (Page 34) MSDN Magazine - April 2008 - Cutting Edge (Page 35) MSDN Magazine - April 2008 - Cutting Edge (Page 36) MSDN Magazine - April 2008 - Cutting Edge (Page 37) MSDN Magazine - April 2008 - Cutting Edge (Page 38) MSDN Magazine - April 2008 - Cutting Edge (Page 39) MSDN Magazine - April 2008 - Cutting Edge (Page 40) MSDN Magazine - April 2008 - Cutting Edge (Page 41) MSDN Magazine - April 2008 - Cutting Edge (Page 42) MSDN Magazine - April 2008 - Cutting Edge (Page 43) MSDN Magazine - April 2008 - Cutting Edge (Page 44) MSDN Magazine - April 2008 - Cutting Edge (Page 45) MSDN Magazine - April 2008 - Cutting Edge (Page 46) MSDN Magazine - April 2008 - Foundations (Page 47) MSDN Magazine - April 2008 - Foundations (Page 48) MSDN Magazine - April 2008 - Foundations (Page 49) MSDN Magazine - April 2008 - Foundations (Page 50) MSDN Magazine - April 2008 - Foundations (Page 51) MSDN Magazine - April 2008 - Foundations (Page 52) MSDN Magazine - April 2008 - Foundations (Page 53) MSDN Magazine - April 2008 - Foundations (Page 54) MSDN Magazine - April 2008 - Foundations (Page 55) MSDN Magazine - April 2008 - Foundations (Page 56) MSDN Magazine - April 2008 - Foundations (Page 57) MSDN Magazine - April 2008 - Foundations (Page 58) MSDN Magazine - April 2008 - Foundations (Page 59) MSDN Magazine - April 2008 - Foundations (Page 60) MSDN Magazine - April 2008 - Foundations (Page 61) MSDN Magazine - April 2008 - Foundations (Page 62) MSDN Magazine - April 2008 - Foundations (Page 63) MSDN Magazine - April 2008 - Foundations (Page 64) MSDN Magazine - April 2008 - Foundations (Page 65) MSDN Magazine - April 2008 - Foundations (Page 66) MSDN Magazine - April 2008 - Foundations (Page 67) MSDN Magazine - April 2008 - Foundations (Page 68) MSDN Magazine - April 2008 - Foundations (Page 69) MSDN Magazine - April 2008 - Foundations (Page 70) MSDN Magazine - April 2008 - Foundations (Page 71) MSDN Magazine - April 2008 - Foundations (Page 72) MSDN Magazine - April 2008 - Foundations (Page 73) MSDN Magazine - April 2008 - Foundations (Page 74) MSDN Magazine - April 2008 - Foundations (Page 75) MSDN Magazine - April 2008 - Foundations (Page 76) MSDN Magazine - April 2008 - Foundations (Page 77) MSDN Magazine - April 2008 - Foundations (Page 78) MSDN Magazine - April 2008 - Foundations (Page 79) MSDN Magazine - April 2008 - Foundations (Page 80) MSDN Magazine - April 2008 - Foundations (Page 81) MSDN Magazine - April 2008 - Foundations (Page 82) MSDN Magazine - April 2008 - Foundations (Page 83) MSDN Magazine - April 2008 - Foundations (Page 84) MSDN Magazine - April 2008 - Foundations (Page 85) MSDN Magazine - April 2008 - Foundations (Page 86) MSDN Magazine - April 2008 - Foundations (Page 87) MSDN Magazine - April 2008 - Foundations (Page 88) MSDN Magazine - April 2008 - Foundations (Page 89) MSDN Magazine - April 2008 - Foundations (Page 90) MSDN Magazine - April 2008 - Foundations (Page 91) MSDN Magazine - April 2008 - Foundations (Page 92) MSDN Magazine - April 2008 - Foundations (Page 93) MSDN Magazine - April 2008 - Foundations (Page 94) MSDN Magazine - April 2008 - Foundations (Page 95) MSDN Magazine - April 2008 - Foundations (Page 96) MSDN Magazine - April 2008 - Foundations (Page 97) MSDN Magazine - April 2008 - Foundations (Page 98) MSDN Magazine - April 2008 - Test Run (Page 99) MSDN Magazine - April 2008 - Test Run (Page 100) MSDN Magazine - April 2008 - Test Run (Page 101) MSDN Magazine - April 2008 - Test Run (Page 102) MSDN Magazine - April 2008 - Test Run (Page 103) MSDN Magazine - April 2008 - Test Run (Page 104) MSDN Magazine - April 2008 - Test Run (Page 105) MSDN Magazine - April 2008 - Test Run (Page 106) MSDN Magazine - April 2008 - Service Station (Page 107) MSDN Magazine - April 2008 - Service Station (Page 108) MSDN Magazine - April 2008 - Service Station (Page 109) MSDN Magazine - April 2008 - Service Station (Page 110) MSDN Magazine - April 2008 - Service Station (Page 111) MSDN Magazine - April 2008 - Service Station (Page 112) MSDN Magazine - April 2008 - Service Station (Page 113) MSDN Magazine - April 2008 - Service Station (Page 114) MSDN Magazine - April 2008 - Windows with C++ (Page 115) MSDN Magazine - April 2008 - Windows with C++ (Page 116) MSDN Magazine - April 2008 - Windows with C++ (Page 117) MSDN Magazine - April 2008 - Windows with C++ (Page 118) MSDN Magazine - April 2008 - Windows with C++ (Page 119) MSDN Magazine - April 2008 - Windows with C++ (Page 120) MSDN Magazine - April 2008 - Windows with C++ (Page 121) MSDN Magazine - April 2008 - Windows with C++ (Page 122) MSDN Magazine - April 2008 - Going Places (Page 123) MSDN Magazine - April 2008 - Going Places (Page 124) MSDN Magazine - April 2008 - Going Places (Page 125) MSDN Magazine - April 2008 - Going Places (Page 126) MSDN Magazine - April 2008 - Going Places (Page 127) MSDN Magazine - April 2008 - { End Bracket } (Page 128) MSDN Magazine - April 2008 - { End Bracket } (Page Cover3) MSDN Magazine - April 2008 - { End Bracket } (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.