Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 80 - 2617_JSSPS_C-7
P. 80

    Step 16:  Drag and drop the SpeechRecognizer and TextToSpeech components, which are non-visible,
                            onto the phone screen.

                  Step 17:  Click on the Experimental component in the palette pane.
                  Step 18:  Drag and drop the ChatBot component, which are non-visible, onto the phone screen.

                  Step 19:  Choose the Provider you want in the ChatBot1 section under Behavior.

                  Step 20:  Click on the Blocks button in the top-right corner to switch to the Blocks Editor.
                  Step 21:  Click on the Button1 block from the Blocks palette to open its blocks. Drag the when Button1.

                            Click block to the workspace.
                  Step 22:  Click on the ChatBot1 block from the Blocks palette to open its blocks. Drag the call ChatBot1.

                            Converse block and place it inside the when Button1.Click block.
                  Step 23:  Click on the TextBox1 block from the Blocks palette to open its blocks. Drag the TextBox1.

                            Text block and connect it to the question input of the ChatBot1.Converse block.
                  Step 24:  Click on the ChatBot1 block again to open its blocks. Drag the when ChatBot1.GotResponse

                            block to the workspace.
                  Step 25:  Click on the Label2 block from the Blocks palette to open its blocks. Drag the set Label2.Text

                            to block and place it inside the when ChatBot1.GotResponse block.

                  Step 26:  Hover the mouse over responseText, select the get responseText block and connect it to
                            the set Label2.Text to block.
                  Step 27:  Click on the TextToSpeech1 block from the Blocks palette to open its blocks. Drag the call

                            TextToSpeech1.Speak block and place it inside the when ChatBot1.GotResponse block.

                  Step 28:  Click on the Text block from the Blocks palette to open its blocks. Drag a text string block
                            and connect it to the message input of the call TextToSpeech1.Speak block. Type the text:
                            “Should I read this text?”

                            Premium Edition-VII
                     78

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