Announcement

Collapse
No announcement yet.

Voice Recognition Syntax Guide

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Voice Recognition Syntax Guide

    Here is a guide for the syntax of the voice recognition feature of the kinect plugin

    Optional words or phrases:

    words or phrases enclosed in brackets, i.e [ and ], are optional. For example the phrase diagram "Turn [the] light on" indicates that both "Turn light on" and "Turn the light on" will be recognized.

    Multiple choices:

    Multiple choices of required words or phrases are shown enclosed in < and > symbols. For example the phrase diagram "Turn the light <on|off>" indicates that both "Turn the light on" and "Turn the light off" will be recognized.

    In case of multiple choices you often need to know which choice has been spoken to trigger an action accordingly. That's why when a phrase diagram that includes one or more multiple choices, is recognized, the plugin set some global variables to what has been actually spoken. The name of these global variables are:
    Kinect<instance_name>Var<choice_index>
    For example if the plugin instance name is "LivingRoom", the global variable for the first choice of your phrase is called KinectLivingRoomVar0
    If you want all your plugin instances to use the same global variables (i.e KinectVar0, KinectVar1, ...., KinectVar9) , untick the "Use Global Vars Specifics to Instance" setting in the Voice Recognition tab of the Config page.

    To retrieve the value of these variables from a script, use
    Code:
    hs.GetVar("KinectVar0")
    ...
    hs.GetVar("KinectVar9")
    you can set multiple choices within an optional phrase or word
    turn the lights on [in <one|two|three> minutes] //OK

    you can have optional words or phrases within a multiple choice
    <turn on [the] office [lights] | turn [the] office [lights] on>//OK

    but you can't have nested multiple choices or nested optional phrases
    <turn <on|off> the lights | <shut|open> the lights> //WRONG

    Wildcards:

    You can specify one or several * anywhere in the phrase to be recognized, and the recognition engine will accept any words or group of words instead of the *. Moreover the plugin will record as wav files the wildcard words you spoke. The files are saved as Wave/Kinect<instance_name>Wildcard<wildcard_index>.wav
    for example if the instance name is "LivingRoom" and you only have one wildcard in the phrase, the file is saved as Wave/KinectLivingRoomWildcard0.wav

    Screenshot below shows a simple example: if you say "Kinect, my name is spud", HS will answer back "Hello spud. Nice to meet you!", the "spud" part being your own recorded voice

    Click image for larger version

Name:	wildcard.jpg
Views:	2
Size:	59.0 KB
ID:	1207365

    Replacement Variables:

    You can use replacement variables in your phrases and the plugin will dynamically replace them by their value.

    Click image for larger version

Name:	replacement_variables.jpg
Views:	2
Size:	23.4 KB
ID:	1207366

    It works with global variables as well as all others type of replacement variables supported by HS: http://homeseer.com/support/homeseer..._variables.htm

    Notes:

    - Wildcards and replacement variables only work with Event voice commands (.i.e. "A phrase was recognized" Trigger) and NOT with Device voice commands.
    - Numbers and Dates have to be written with words. For example use "Play song number five" instead of "Play song number 5".
    Last edited by spud; March 13th, 2015, 10:11 AM.
Working...
X