Author Topic: Group/Action confiedence rate + Command flow  (Read 3439 times)

0 Members and 1 Guest are viewing this topic.

tria

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 0
    • View Profile
Group/Action confiedence rate + Command flow
« on: March 01, 2012, 12:29:21 PM »
Hi,

I have two feature requests, they maybe hard to implement, but would appreciate if they are taken under consideration:

1). Have confidence rate for every Group or Action that will override the global confidence rate when set. This will enable marking extremely critical command groups (shutdown/close/restart...) with high confidence rate, while other commands that requires low confidence rate (like not supported languages) to have a different rate. Any other command will fallback to the global settings.

2). Have a command flow, where you can say one command, and this command allow you to say a specific set of commands (depending on the input for the first command). Examples, you say something, VC replay (using TTS) with given choices, or another question, and you replay with another answer, and so on. Another example, you choose to play a file (in XBMC for example), but the mentioned file is a prefix for more than one file, then you have VC ask whether you want this or that, and you answer back. Of course, the logic handling should be left to the user (using a similar thing to the conditional statement in the action builder).

What do you guys think

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7712
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Group/Action confiedence rate + Command flow
« Reply #1 on: March 01, 2012, 12:44:19 PM »
1) You can override the required confidence at the command level.  When you open the command builder it is on the top right.

2) You can do this by turning groups on and off.  If you necessary you can also set user variables and then use them later.  Currently you can only store {lastresult} but I can expand this to give more control fairly easily.

One day I would like to create better tools for context flow but it is a big undertaking.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7712
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Group/Action confiedence rate + Command flow
« Reply #2 on: March 01, 2012, 12:54:04 PM »
commands can also be set to require confirmation before executing.

tria

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 0
    • View Profile
Re: Group/Action confiedence rate + Command flow
« Reply #3 on: March 01, 2012, 02:29:12 PM »
For (1), Oh! sorry didn't pay attention to that!
For (2), Hmmm... I like the idea of making groups that are disabled, and one action enable them and disable all other groups, and after executing one of the actions toggle them back. It would be difficult to maintain as it grows, but it is still possible. But I welcome supporting context flow, even if that will be in the far future.

One question since you mentioned {LastResult} and the possibility to expand it. Say you have a list of items that have the same prefix (name-wise), and I have them listed in a xml payload file. Is it possible to get the other matching prefixes to present them to the user using further logic controls or enabling/disabling groups?
Similarly, imagine a case where the payload file my contains items with exactly the same names, but different IDs (values), would it be possible to get a list of them. Is it possible to link them to category (another payload file) so that it is easier to identify them. A that belongs to B, or A that belongs to C (where A is the name of the item, and B/C two different categories names).

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7712
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Group/Action confiedence rate + Command flow
« Reply #4 on: March 01, 2012, 02:40:59 PM »
One question since you mentioned {LastResult} and the possibility to expand it. Say you have a list of items that have the same prefix (name-wise), and I have them listed in a xml payload file. Is it possible to get the other matching prefixes to present them to the user using further logic controls or enabling/disabling groups?
Similarly, imagine a case where the payload file my contains items with exactly the same names, but different IDs (values), would it be possible to get a list of them. Is it possible to link them to category (another payload file) so that it is easier to identify them. A that belongs to B, or A that belongs to C (where A is the name of the item, and B/C two different categories names).

I'm sorry, I'm sure this makes perfect sense to you but I am unable to figure out what you are saying / asking.

on another topic, I was trying to upload using wget and I could not figure out the correct syntax.  I am using this:

Code: [Select]
wget -post-file="rec2.flac" --no-check-certificate --header="Content-Type: audio/x-flac; rate=16000" "https://www.google.com/speech-api/v1/recognize?lang=en"
but I am getting this back: ERROR 405: HTTP method GET is not supported by this URL.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7712
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Group/Action confiedence rate + Command flow
« Reply #5 on: March 01, 2012, 02:46:30 PM »
nevermind, I got it.  I was missing a double dash...  this works:

Code: [Select]
wget --post-file="rec2.flac" --no-check-certificate --header="Content-Type: audio/x-flac; rate=16000" "https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&lang=en"

tria

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 0
    • View Profile
Re: Group/Action confiedence rate + Command flow
« Reply #6 on: March 01, 2012, 03:03:42 PM »
wget use -- for long params, and - for short ones (confusing). You should've used the one I sent (changing the rate), but it is good you figured it out.

Sorry for not being clear.
Two examples:
1). Payload with lots of items, but lets say that some of them are:
Name
Name Two
Name Three
....
They have the prefix (Name), but differ in the end part (Two, Three). If I do a command with this payload file, and say a command with the name "Name", it will pick the first one for sure. Is there is a way to get a list of all possible options (Name, Name Two, Name Three), instead of assuming it is the exactly matching one. And how to access each one of them, like when you talked about expanding {LastResult}

2). This time we have two payload files. One for the items, and another for categories. The items file can have one item name appearing more than once (but with different value). Each item belong to a category (from the category file), and this is why there might be two or more files with the same name, but with different category. Is it possible to implement such approach with payloads files?
If so, how do you handle it in VC, so that you can say item A from category B, or item A from category C and get that specific item value to use it in further commands. Or you say item A, and if it is unique (one item), it will return the item value right away. If it is not unique, it will give you the list of possible category, and then decide about the item value to return. It is really hard to explain even if I explained it in my own language :)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7712
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Group/Action confiedence rate + Command flow
« Reply #7 on: March 01, 2012, 04:45:30 PM »
Two examples:
1). Payload with lots of items, but lets say that some of them are:
Name
Name Two
Name Three
....
They have the prefix (Name), but differ in the end part (Two, Three). If I do a command with this payload file, and say a command with the name "Name", it will pick the first one for sure. Is there is a way to get a list of all possible options (Name, Name Two, Name Three), instead of assuming it is the exactly matching one. And how to access each one of them, like when you talked about expanding {LastResult}
Actually if you use subset matching it will probably return all 3.  For example, if you ask to "play artist David".  It will start playing the most likely one, but it will show the other artists who have "David" in their name.  You can then execute one of the other options by saying "Option 3" or "Option 4".  This is the whole idea of alternates.

Other than that, there isn't really a way to do what you are talking about.

2).  No there is no way to do this AFAIK.  VC is built around the idea of your phrase being specific, and not (yet) around the concept of a back and forth conversation, or presenting the user with menu choices.  If you want to establish the category first in one command, and use that to enable the correct group of items you can.  Or you can specify the category and the item in the same command by using both payload files.  "turn living room lamp on" could use one payload for all your devices "living room lamp" and the other payload could contain the actions (on, off, brighter, dimmer)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7712
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Group/Action confiedence rate + Command flow
« Reply #8 on: March 01, 2012, 04:46:46 PM »
wget use -- for long params, and - for short ones (confusing). You should've used the one I sent (changing the rate), but it is good you figured it out.

Thanks,  I didn't realize you had given me an example of wget in that PM.  Oh well.