Announcement

Collapse
No announcement yet.

Using sub grammars

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

    Using sub grammars

    in version 3.0.0.8 of the plugin I have added the possibility to create sub grammars and load them temporarily. This allow to create context specific commands without having to say the attention phrase before each command.

    For example I can define a sub grammar to control XBMC:
    Click image for larger version

Name:	xbmc_grammar.jpg
Views:	1
Size:	52.6 KB
ID:	1206343


    Then I define an event to load this grammar when I say "Computer, activate XBMC mode". The grammar is automatically unloaded if no commands from the XBMC grammar is recognized in the timeout period.
    Click image for larger version

Name:	load_grammar.jpg
Views:	1
Size:	79.7 KB
ID:	1206342


    Then I can define events with kinect triggers attached to the XBMC grammar like on the screenshot below. If the XBMC grammar is loaded, saying "Show movies" will make XBMC jump to the movies page, and if it isn't loaded this command won't be recognized.
    Click image for larger version

Name:	subgrammar_event.jpg
Views:	1
Size:	66.9 KB
ID:	1206344

    Here is a demo video (in French) for this feature. Sorry for the poor audio quality.

    Last edited by spud; July 14, 2014, 06:17 AM.

    #2
    Hi spud,

    is there a way to lock and then unlock into a sub grammars, I know that there is a set for so many seconds


    Great plugin

    Thanks

    Comment


      #3
      Originally posted by S.Morris View Post
      Hi spud,

      is there a way to lock and then unlock into a sub grammars, I know that there is a set for so many seconds


      Great plugin

      Thanks
      sorry I don' t understand what you mean by "lock/unlock into a sub grammar" ?

      Comment


        #4
        What I mean is keep it in a particular grammar like keep it set to xbmc grammar,

        I know there is an timeout option when creating an event to change grammar, What is the max on this

        Also went creating a Kinect event there are some options to load and unload grammar, what does this do? is it the same as timing out?

        What I have is 2 power macro events under a power grammar, did this in an hope that it would be more difficult to retrigger, I would like to disable when the macro has run to prevent it running again, especially the power off macro, any ideas?
        Last edited by S.Morris; November 14, 2014, 10:33 AM.

        Comment


          #5
          Originally posted by S.Morris View Post
          What I mean is keep it in a particular grammar like keep it set to xbmc grammar,

          I know there is an timeout option when creating an event to change grammar, What is the max on this

          Also went creating a Kinect event there are some options to load and unload grammar, what does this do? is it the same as timing out?

          What I have is 2 power macro events under a power grammar, did this in an hope that it would be more difficult to retrigger, I would like to disable when the macro has run to prevent it running again, especially the power off macro, any ideas?
          there is no maximum for the timeout parameter, and if you set it to 0 it will never timeout. So if you load a sub grammar with a timeout set to 0, it will be kept active until an "Unload Grammar" action is performed

          Regarding you power macro, I think you could use the "Unload Grammar" action to prevent specific commands to be run.

          Comment


            #6
            Thanks

            So if I unload a grammar it will stay unloaded until I either reload or presume restart the plugin

            Comment


              #7
              Originally posted by S.Morris View Post
              Thanks

              So if I unload a grammar it will stay unloaded until I either reload or presume restart the plugin
              It will stay unloaded until you reload it.
              Sub grammars are not loaded on restart of the plugin. Only the Main grammar is.

              Comment


                #8
                I would like to show off my system when I have visitors at home, but I wouldn't want to be saying the attention phrase repeatedly, is there any way of going around this?
                Hector
                ____________________________________
                Win.2003 OS, HS3
                BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
                BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
                MyTrigger,ACRF2,W800,Zwave
                AP800,Honeywell Stat

                Comment


                  #9
                  Originally posted by Rotech View Post
                  I would like to show off my system when I have visitors at home, but I wouldn't want to be saying the attention phrase repeatedly, is there any way of going around this?
                  yes this is exactly the purpose of sub grammars

                  create a "ShowOff" sub grammar, then all the voice commands attached to this sub grammar won't need the attention phrase.

                  but the sub grammars are not loaded by default so, you need to create an event that load it.

                  Comment


                    #10
                    Originally posted by spud View Post
                    yes this is exactly the purpose of sub grammars

                    create a "ShowOff" sub grammar, then all the voice commands attached to this sub grammar won't need the attention phrase.

                    but the sub grammars are not loaded by default so, you need to create an event that load it.
                    I have a group of voice commands that I use randomly during normal use. If I group all these command under a grammar, I can't call them up individually unless I load the grammar. I think that I may need to creat an additional group for showing off my sistem. Ouch!!! That a lot of events. Unless some has a better idea?
                    Hector
                    ____________________________________
                    Win.2003 OS, HS3
                    BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
                    BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
                    MyTrigger,ACRF2,W800,Zwave
                    AP800,Honeywell Stat

                    Comment


                      #11
                      Originally posted by Rotech View Post
                      I have a group of voice commands that I use randomly during normal use. If I group all these command under a grammar, I can't call them up individually unless I load the grammar. I think that I may need to creat an additional group for showing off my sistem. Ouch!!! That a lot of events. Unless some has a better idea?
                      instead of duplicating all your events you could just add an additional trigger:
                      Code:
                      IF Kinect A phrase was recognized
                          phrase = Turn the lights on
                          grammar = Main
                      OR IF Kinect A phrase was recognized
                           phrase = Turn the lights on
                          grammar = Showtime

                      Comment


                        #12
                        Spud, you are the man with the big sleeves, that's a great idea!!!
                        Hector
                        ____________________________________
                        Win.2003 OS, HS3
                        BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
                        BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
                        MyTrigger,ACRF2,W800,Zwave
                        AP800,Honeywell Stat

                        Comment

                        Working...
                        X