Mapping with Keyword Manager, Keyword and actions

Our Keyword Manager, four defined keywords and the action for each keyword is ready. Let's put them together.

  1. Select the Keyword Manager component in the Inspector window. By default, Keywords and Responses Size is 0.
Keyword Manager script in inspector window
  1. Update Keywords and Responses Size to 4 and press the Tab key. The property element for 4 different keywords will be created.
Response item for the action
  1. Let's apply the first Keyword - Show Speaker. Then click on the (+) icon in the Response List.
Adding Response List
  1. In the response item, no object is specified. We want to apply the Voice Command to Left_Speaker_geo object. So, either drag and drop the object here from Object Hierarchy or click on the Object Icon and take the reference of the same speaker object.
Linking the object with Keyword Manager
  1. Then select the corresponding function from Function Drop Down. For the ShowSpeaker() we need to navigate through VoiceCommandHandler | ShowSpaker().
Add VoiceCommandHandler

You have successfully added your first Voice Command.

Apply the other three keywords and map the function respectively to the methods.

Just keep in mind, for Rotate, you need to give reference of the entire HoloLens object as we want to rotate the entire object.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.99.152