Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 81 - 2617_JSSPS_C-7
P. 81

    Step 29:  Click on the SpeechRecognizer1 block from the Blocks palette to open its blocks. Drag the
                              call SpeechRecognizer1.GetText block and place it inside the when ChatBot1.GotResponse
                              block.

                     Step 30:  Click on the SpeechRecognizer1 block. Drag the when

                              SpeechRecognizer1.AfterGettingResult block to the
                              workspace.
                     Step 31:  Click on the Control block from the Blocks palette to open

                              its  blocks.  Drag the  if-then  block  and  place  it  inside  the
                              SpeechRecognizer1.AfterGettingText  block  and  add  the
                              else if and else blocks as shown in the image to create the
                              desired conditional structure.

                     Step 32:  Click on the Logic block. Drag the comparison block and connect it to if in the if then block.

                     Step 33:  Hover the mouse over result, select get result block and add it inside the comparison block.
                     Step 34:  Click on the Text block. Drag a text string block and add it inside the comparison block. Type

                              the text: “no”.
                     Step 35:  Click on the TextToSpeech1 block. Drag the call TextToSpeech1.Speak block and place it

                              inside the if then statement.
                     Step 36:  Click on the Text block. Drag a text string block and connect it to the message input of the

                              call TextToSpeech1.Speak block. Type the text: “Okay, so please read it”.
                     Step 37:  Click on the Logic block. Drag the comparison block and connect it to if in the if then else if

                              block.

                     Step 38:  Hover the mouse over result, select get result block and add it inside the comparison block.
                     Step 39:  Click on the Text block. Drag a text string block and add it inside the comparison block. Type
                              the text: “Please read this”.

                     Step 40:  Click on the TextToSpeech1 block. Drag the call TextToSpeech1.Speak block and place it

                              inside the if then else if then statement.
                     Step 41:  Click on the Label2 block. Drag the Label2.Text block and connect it to the message field of

                              the call TextToSpeech1.Speak block.
                     Step 42:  Click on the SpeechRecognizer1 block. Drag the call SpeechRecognizer1.Stop block and

                              place it inside the if then else if then else statement.

                                                                                                   App Development      79

| 76 77 78 79 80 81 82 83 84 85 86 |