No announcement yet.

Passing everything to a script

  • Filter
  • Time
  • Show
Clear All
new posts

    Passing everything to a script

    So I am looking at this plug in now and I really like it. The Kinect is a cheap way to get a solid mic. Too bad it can not be run easily in different rooms without a PC.

    Anyway my plan is to use a script to processes the VR using a database to match phrases, learn new ones etc. So I want to pretty much have the plug-in pick up the recognition phrase and then trigger a event passing all of the phrase as a variable. I know you have the different options like KinectVar0, KinectVar1 etc. Is there a variable with the whole string unparsed?

    yes there is a global variable called "KinectLastVoiceCommand" which is set to the whole command string every time a command is recognized.

    that being said, I'm not sure what you mean by "learn new ones", but note that the Kinect cannot recognize a phrase that is not part of its grammar.


      Thank you spud

      That is very helpful. The learning I am referring too is that I will be taking commands that do not match to the database and then logging them for review so that I can either map them to an existing response or create new ones.

      That said I am running into a problem with using the variable. I could not figure out a syntax to pass it to the script as a parameter from inside the event itself. So I tried to pull it in the script using hs.GetVar but I am only getting the first word in the string. Is this some sort of object or array instead of a string?

      Any help would be appreciated.


        again I'm not sure I understand what you want to do, but I guess it's not possible because the Kinect can only recognize predefined phrases that are set as "A phrase was recognized" triggers or device commands, so it can't really "learn" anything...

        I just tested the KinectLastVoiceCommand global var, and it works for me, it is set to the phrase recognized. For debugging you can see the value of any global variable from the "Tools > Global Variables, Timers and Counters" menu


          Sorry I did not understand

          I missed the point. So I can not just let the kinect recognize any phrase use a event with a wildcard only and then push the full text to a script for processing.

          I apologize for the confusion. I thought that the global var had what the kinect heard so I could just do all the processing in a script.

          Thank you again.