Author Topic: Prefix Mode  (Read 7455 times)

0 Members and 1 Guest are viewing this topic.

ddl

  • Sr. Member
  • ****
  • Posts: 118
  • Karma: 0
    • View Profile
Prefix Mode
« on: November 18, 2013, 08:05:16 PM »
Not sure if I placed this question in the right forum so I apologize up front if not.

When I have enabled the Prefix Mode and used the default prefix---commando.  I get the following error message. 

- VC.Prefix.Start
- Cant find command: The given key was not present in the dictionary.

The command was issued while VC is in standby mode.

What am I missing here?

mdsh

  • $upporter
  • Sr. Member
  • *****
  • Posts: 127
  • Karma: 4
    • View Profile
Re: Prefix Mode
« Reply #1 on: November 19, 2013, 02:12:47 AM »
Hi there, i havent used the prefix mode yet but could you maybe take a screenshot of your config and upload for us to look at. This might help someone here to brtter help you. And i will test as well

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Prefix Mode
« Reply #2 on: November 19, 2013, 03:09:37 AM »
Hi ddl, this error is displayed in the history window, when VC doesn't understand a command after your prefix.

This is possible if:

-  you have loud background noises in your environment (voices, music, TV, ...) - If yes, use a "softmute action" which is triggered by "VC.Prefix.Start" event.

-  the pause between prefix and your spoken command is too long. - Do not wait too long after your spoken prefix, say your prefix and command in one piece.

-  the spoken command is not available. - Take a look in the command editor, check that the command is available and the command group is not disabled.

This command group does a softmute in XBMC and MediaMonkey at prefix start and after your spoken command (prefix end) does a soft-unmute.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="False" name="VC prefix start-end" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="248" name="strat prefix event" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>ProcessRunning</ifType>
      <ifParams>MediaMonkey&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>MM.SoftMute</cmdType>
          <cmdString>10</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>ProcessRunning</ifType>
      <ifParams>XBMC&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>XBMC.SoftMute</cmdType>
          <cmdString>10</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <event>VC.Prefix.Start</event>
  </command>
  <command id="304" name="end prefix event" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>ProcessRunning</ifType>
      <ifParams>MediaMonkey&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>MM.SoftUnmute</cmdType>
          <cmdString />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>ProcessRunning</ifType>
      <ifParams>XBMC&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>XBMC.SoftUnMute</cmdType>
          <cmdString />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <event>VC.Prefix.End</event>
  </command>
</commandGroup>

The next command group is a bit different from the first and more comfortable - we call it "Vox-Intercom". It does a partial sound mute on prefix start, switch VC in On-mode and wait for a command. After a recognized command VC switch back to the standby-mode and unmute the volume. If you have set a idle timeout in the options menu, VC automatically switch back to standby and unmute the volume when the time is expired without a command.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="Vox Intercom with prefix and idle timeout" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1635" name="Ducking start" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Sound.PartialMute</cmdType>
      <cmdString>10</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.On</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>VC.Prefix.Start</event>
  </command>
  <command id="1685" name="Ducking End" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>Sound.PartialUnMute</cmdType>
          <cmdString />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <action>
      <cmdType>VC.Standby</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>VC.Prefix.End</event>
  </command>
  <command id="722" name="idle timeout" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.Standby</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Sound.PartialUnMute</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>vc.idletimeout</event>
  </command>
</commandGroup>

I hope this helps
« Last Edit: April 27, 2015, 02:39:55 PM by nime5ter »
***********  get excited and make things  **********

ddl

  • Sr. Member
  • ****
  • Posts: 118
  • Karma: 0
    • View Profile
Re: Prefix Mode
« Reply #3 on: November 19, 2013, 03:10:44 PM »
Thanks all.  I will try the suggestions this evening.

AgileHumor

  • Contributor
  • ***
  • Posts: 62
  • Karma: 3
    • View Profile
Re: Prefix Mode
« Reply #4 on: February 24, 2014, 03:55:40 AM »

-  the pause between prefix and your spoken command is too long. - Do not wait too long after your spoken prefix, speak you're prefix and command in one piece.

Kalle, is there a way to play wav after the prefix...but before the spoken command.   When I used your second example,  it doesn't play the normal wav file when it goes from standby to on....but the volume does mute for the duration of the spoken command.

1. I speak: "Computer"
2. wave File Plays for 1 second
3. Volume ducks
3. I speak my command

Is there a hard limit on the pause between the prefix and the command?  It seems pretty short and I'm always feeling rushed.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Prefix Mode
« Reply #5 on: February 24, 2014, 04:53:33 AM »
Yes this is correct, because VC mute the volume before the sound is played. This is easy to solve   ;D

Use this Command Group code (the "Ducking start" contain a pause of 1 second before VC switch to ON, you can set the pause time for your needs):

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="Vox Intercom with prefix and idle timeout" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1636" name="Ducking start" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.On</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <cmdString>1000</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Sound.PartialMute</cmdType>
      <cmdString>10</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>VC.Prefix.Start</event>
  </command>
  <command id="1686" name="Ducking End" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>Sound.PartialUnMute</cmdType>
          <cmdString />
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <action>
      <cmdType>VC.Standby</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>VC.Prefix.End</event>
  </command>
  <command id="785" name="idle timeout" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>VC.Standby</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Sound.PartialUnMute</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>vc.idletimeout</event>
  </command>
</commandGroup>
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Prefix Mode
« Reply #6 on: February 24, 2014, 08:46:24 AM »
I don't think you want prefix mode.  You want "pay attention", wait for acknowledgement, give command.

Prefix mode is for doing all of this in a single command. You cannot have long pauses in a single command because pauses are used to determine when commands begin and end.  Yes there is a fixed limit it of how long it will wait before it gives up and cancels the recognition for that command and starts waiting for a new command.

If you use the pay attention method, you can have it revert back to standby by using idle timeout settings in the main options tab.
« Last Edit: February 24, 2014, 11:58:53 AM by jitterjames »

AgileHumor

  • Contributor
  • ***
  • Posts: 62
  • Karma: 3
    • View Profile
Re: Prefix Mode
« Reply #7 on: February 25, 2014, 04:05:34 AM »
It's getting a little late, but trying to piece this together.

It's modeled after Star Trek TNG.
&feature=player_embedded#t=45

* Prefix
* Wave File Plays   http://trekcore.com/audio/computer/computerbeep_29.mp3 
* You state Command
If Command:
 ** Accepted - PlayWav   http://trekcore.com/audio/computer/input_ok_3_clean.mp3
 ** Not Recognized PlayWav   http://trekcore.com/audio/computer/input_failed2_clean.mp3

I'm not really a trekie, but it's a good vision for my first foray with VC as any :)

PS - This is my amulet remote up wav modeled after the communicator:   http://trekcore.com/audio/communicator/tng_chirp_clean.mp3

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Prefix Mode
« Reply #8 on: February 25, 2014, 05:15:49 AM »
I have created a StarTrek GUI with iRule, which is communicate with VC  ;D  - but only for fun, I don't use it in real.

http://www.youtube.com/watch?v=7JyM7bLgADU


To create your example above (the most of them) is possible with VC events (for example: VC generate a NotRecognized event), but note that in the standby mode this event will generate all the time, because the mic in standby mode is open and VC pick any sound and interpreted it "mostly" as NotRecognized and so the sound for "not recognized" will play constantly (take a look in the VC history window, when VC is in standby mode).
I hope you understand what I mean.
« Last Edit: February 25, 2014, 06:20:10 AM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Prefix Mode
« Reply #9 on: February 25, 2014, 08:17:57 AM »
Yes but you can use VC.Reco.TooLow which occurs when it "almost" understood you but the confidence was below your minimum set value.

AgileHumor

  • Contributor
  • ***
  • Posts: 62
  • Karma: 3
    • View Profile
Re: Prefix Mode
« Reply #10 on: February 25, 2014, 02:16:29 PM »
I have created a StarTrek GUI with iRule, which is communicate with VC  ;D  - but only for fun, I don't use it in real.

http://www.youtube.com/watch?v=7JyM7bLgADU

This is awesome! Love it!

Talking about a tablet interface here:
http://forum.micasaverde.com/index.php/topic,22763.msg159762.html#msg159762

I'll try to get your examples working events (with VC.Reco.TooLow).

Thank you soooo much!

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Prefix Mode
« Reply #11 on: February 25, 2014, 02:59:49 PM »
Haha, thanks. I have also bought the vera modul for iRule, but this will waste your money - it doesn't work with all zwave devices. I used the VC vera plugin commands to control the light switches and iRule can communicate with VC which is perfect for the LCARS - so each button has a voice or sound response.
With iRule you can use also a cheap android tablet to use this LCARS pannel  ;)  (as wallmount solution)
***********  get excited and make things  **********

donmehdi

  • Jr. Member
  • **
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Prefix Mode
« Reply #12 on: April 27, 2015, 01:42:20 PM »
How can i set a time to say the command between the ducking start and end.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Prefix Mode
« Reply #13 on: April 27, 2015, 02:35:35 PM »
Please rephrase your question because it is not clear to me what you are asking.

Feel free to post in another language if that helps.

donmehdi

  • Jr. Member
  • **
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Prefix Mode
« Reply #14 on: April 27, 2015, 02:51:58 PM »
When i use the prefix jarvis (VC.Prefix.start  event to switch vc on) , voxcommando doesn't give me all the time i need to say the command before it goes standby (VC.Prefix.end event to switch vc standby).
I'm using the xml posted by KALLE above