Author Topic: Adaptive (self-adjusting) Prefix Confidence  (Read 2471 times)

0 Members and 1 Guest are viewing this topic.

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Adaptive (self-adjusting) Prefix Confidence
« on: October 26, 2014, 09:46:33 AM »
this requires version 2.107 and up

here is a command that self-adjust the confidence level required for the prefix .... I am not sure if the prefix start event triggers if prefix confidence is low... if not, the value will go up only ....
restarting VC will set it back to the level set in options.

This is an experimental command and might prove to be useful for open air mic setup. The first 2 if commands set a maximum and minimum (default 90 & 50)

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.1.0.7-->
<command id="586" name="Adaptive Prefix Confidence" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="{1} the recognised Prefix&#xD;&#xA;{2} Status&#xD;&#xA;{3} prefix confidence level">
  <action>
    <cmdType>VcAdvanced.Log</cmdType>
    <params>
      <param>--------------------------------------- Start: Adaptive Prefix Confidence --------------------------------------- </param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)&lt;(B)</ifType>
    <ifParams>90.0&amp;&amp;{3}</ifParams>
    <then>
      <action>
        <cmdType>VcAdvanced.Log</cmdType>
        <params>
          <param>--------------------------------------- End: Adaptive Prefix Confidence Posetive --------------------------------------- </param>
          <param>Confidence too high...</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <if ifBlockDisabled="False" ifNot="False">
    <ifType>(A)&lt;(B)</ifType>
    <ifParams>{3}&amp;&amp;50</ifParams>
    <then>
      <action>
        <cmdType>VcAdvanced.Log</cmdType>
        <params>
          <param>--------------------------------------- End: Adaptive Prefix Confidence Posetive --------------------------------------- </param>
          <param>Confidence too low...</param>
        </params>
        <cmdRepeat>1</cmdRepeat>
      </action>
      <action>
        <cmdType>VC.StopMacro</cmdType>
        <params />
        <cmdRepeat>1</cmdRepeat>
      </action>
    </then>
    <else />
  </if>
  <action>
    <cmdType>VcAdvanced.GetOption</cmdType>
    <params>
      <param>intRequiredPrefixConfidence</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PY.ExecString</cmdType>
    <params>
      <param>result=round(({3}+{LastResult})/2)</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VcAdvanced.SetOption</cmdType>
    <params>
      <param>intRequiredPrefixConfidence</param>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VcAdvanced.Log</cmdType>
    <params>
      <param>--------------------------------------- End: Adaptive Prefix Confidence Posetive --------------------------------------- </param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>VC.Prefix.Start</event>
</command>
« Last Edit: October 26, 2014, 01:33:00 PM by Haddood »
When Voice command gets tough, use hand gestures

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Adabtive (self-adjusting) Prefix Confidence
« Reply #1 on: October 26, 2014, 11:04:29 AM »
What is the purpose of this command?  In what way does it adjust the required prefix confidence, under what circumstances, and why?

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: Adabtive (self-adjusting) Prefix Confidence
« Reply #2 on: October 26, 2014, 11:26:35 AM »
What is the purpose of this command?  In what way does it adjust the required prefix confidence, under what circumstances, and why?

I noticed that the prefix confidence level varies from command to command, based on where I am (open air mic) and on background noise level. My setting is 70, however the actual varies from roughly from 76 to 93 .... 

The idea is to set the prefix to highst possible based on the background noise and where I am ... In order to minimize the false positives in the prefix ... Which leads to less false positives all in all
When Voice command gets tough, use hand gestures

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Adabtive (self-adjusting) Prefix Confidence
« Reply #3 on: October 26, 2014, 01:19:13 PM »
OK now I understand what you are hoping to accomplish but I am not convinced it will help.  I think it could just as easily cause more problems than it solves.

First of all, when you move from a situation where you were getting high prefix confidence to a situation where you are getting low prefix confidence (let's say you have moved to a position further from the microphone, or maybe there is some new background noise) then it won't listen to you any more.  You will have to repeat yourself several times to get the prefix confidence requirement low enough again.

Also, if VC is hearing a false prefix with a low confidence, then this will also cause the required confidence to go down which will increase the chance of false positives. (learning from mistakes is not good when the machine thinks the mistake was not a mistake  ::confused)

Personally I think that finding a reasonable average value that works in most situations will be more stable, but I guess you have to try it out for yourself to see what works best for you.  I'm just thinking about the logic of it, I haven't actually tried it, and I could very well be completely wrong!

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
Re: Adaptive (self-adjusting) Prefix Confidence
« Reply #4 on: October 26, 2014, 01:41:53 PM »
I totally agree ... One of the reasons I am sharing is I am hoping others will use it as well and provide feedback ...

I should've clarified that first time I posted. Anyway I added an explanation to make things clearer ...

My ultimate goal is to get VC to be very reliable in open air ... For sure the challenges are not coming from VC itself but from the SR engine. This is an ongoing research wherever there is SR engine.

The adaptive functions I use similarly to adjust phrase confidence proven to be useful in my setup ... That is what encouraged me to apply the same for prefix.

Now testing ..l and I will give feedback in few days
When Voice command gets tough, use hand gestures