Author Topic: Kinect help with numbers  (Read 2505 times)

0 Members and 1 Guest are viewing this topic.

lanos

  • Jr. Member
  • **
  • Posts: 9
  • Karma: 1
    • View Profile
Kinect help with numbers
« on: June 13, 2016, 04:11:59 PM »
S I'm using VC with my kodi set up and I love it. Only problem is I'm using Kinect as a mic and numbers dont register which make commands like "scroll down 1", "browse tv show 30 rock", "play movie 2 guns" etc pretty useless. Now I know on VC options it says that to use numbers I need to create a payloadXML that maps word phrases to number values. But, as noobish as it sounds, I don't even know what that means can someone kind of point me in the right direction on what to do for #'s

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Kinect help with numbers
« Reply #1 on: June 13, 2016, 04:59:20 PM »
Hi Ianos,

Are you familiar with how payload XML files work in VC commands?

They allow use to map phrases to values. For example, in Kodi, each TV show has a unique ID value. But we don't have to ask for a show using its ID value because VoxCommando scans the Kodi database and generates a payload XML file that maps the name of the TV show to its ID.

The wiki page about payloads describes how payload XML works: http://voxcommando.com/mediawiki/index.php?title=Payloads

The comment for using Kinect speech engines with numbers is suggesting that you create payload XML in which number phrases are mapped to digits.

Here is an example that shows the standard Kodi set volume command compared to the way you can do it if you're using Kinect with the Kinect engine:

Standard way:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.9-->
<command id="336" name="Set volume {1} percent (standard way)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="" loopMax="" description="">
  <action>
    <cmdType>XJson.SetVol</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Set volume, Set volume to</phrase>
  <payloadList>5,10,15,20,25,30,40,50,60,70,75,80,90,100</payloadList>
  <phrase>percent</phrase>
</command>

The Kinect variation, using payloadXML instead of a payload list of digits (payloadXML file is attached to this post):
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.9-->
<command id="352" name="Set volume {1} percent (words mapped to digits)" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="" loopMax="" description="">
  <action>
    <cmdType>XJson.SetVol</cmdType>
    <params>
      <param>{1}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>Set volume, Set volume to</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\words2digits.xml</payloadFromXML>
  <phrase>percent</phrase>
</command>

A similar solution can be used for your "scroll down #" command.

However, a payload XML that maps spelled out numbers to digits will not work for media titles.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Kinect help with numbers
« Reply #2 on: June 14, 2016, 03:54:51 PM »
S I'm using VC with my kodi set up and I love it. Only problem is I'm using Kinect as a mic and numbers dont register which make commands like "scroll down 1", "browse tv show 30 rock", "play movie 2 guns" etc pretty useless. Now I know on VC options it says that to use numbers I need to create a payloadXML that maps word phrases to number values. But, as noobish as it sounds, I don't even know what that means can someone kind of point me in the right direction on what to do for #'s

To start it would help us to know if you are using the regular or SP version of VoxCommando, and if you are using English or some other language.  If you are using SP, are you using the speech engine designed for Kinect?

lanos

  • Jr. Member
  • **
  • Posts: 9
  • Karma: 1
    • View Profile
Re: Kinect help with numbers
« Reply #3 on: June 15, 2016, 03:08:04 PM »
Sorry I'm using regular VoxComando, never used SP , and using English
I read through the link about payloads still don't fully understand how to get it to work with # so guess I'm taking the trail and error route until I figure it out

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Kinect help with numbers
« Reply #4 on: June 15, 2016, 10:24:35 PM »
Well then I guess that you did not try any commands with numbers in them yet because they should work just fine for you.

When using the regular version of VoxCommando, the Kinect will not be an issue and numbers will work as they normally would with any other microphone.

If you don't intend to use the SP version of VoxCommando you can stop reading here because there is no issue that affects you.

The number limitation is only an issue when you are using VoxCommando SP with a Kinect for Windows Language Pack as the "Specific Speech Recognizer" (i.e. with one of the speech engines designed specifically for the Kinect).  Apparently these special recognizers are designed to take advantage of the specific acoustic properties of the Kinect (aka the poor scratchy sound), but they also don't include numbers for some reason.  Why Microsoft introduced this limitation is a total mystery to us.

Even if you are using SP with special Kinect recognizers, then numbers will still work to some extent, if you are using English.  A while ago I introduced code to convert some English numbers to use words for the phrases.  The code currently only addresses payload ranges or payload lists though, not payloadXML.  Also, in the case of payload lists, each alias can be only a number (not a combination of words and numbers) or it won't be converted.  So you could have a payload list of 5,10, 15, 20 and that would covert all those numbers to words, but 5,10,15, big 1  would only convert the first 3 numbers, and not "big 1".

I probably could add the option of converting numbers to words for payload XMLs as well but there might be a performance hit for large payloads such as with music libraries.
« Last Edit: June 15, 2016, 10:29:03 PM by jitterjames »