Author Topic: SPEED.THINGS.UP  (Read 14361 times)

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
SPEED.THINGS.UP
« on: October 01, 2020, 10:34:04 PM »
We would all like our software to be a little bit faster, amiright?  Here are a couple of tips that might help you get a little bit more of a performance edge out of VoiceAttack.

First up, recognition speed.  Out of the box, VoiceAttack is set up to wait on the speech engine to complete its recognition before yielding a recognized or unrecognized result.  You know the drill - speak a command, then pause for that certain amount of time and then something happens.  You can actually shortcut the recognition time slightly by cutting out some of that last bit of pausing at the end of a spoken phrase.  To have VoiceAttack attempt to remove some of this silence, simply set your command's 'Recognition' setting to, 'Restricted Continuous Speech'.  Depending on your spoken phrases, this may actually have a noticeable difference in recognition speed. 

Well, with any performance increase, there's got to be some kind of penalty.  The penalty for this bit of a boost is that the phrases that you use must be unique in order for this to work and not interfere with other commands.  Basically, you need to have phrases that are NOT contained within longer phrases - otherwise your longer phrases may not get a chance to be executed (since the shortcutting will execute the shorter phrase first).  For instance, lets say you have a command with a spoken phrase of, 'fire on my command' and another command with a spoken phrase of, 'fire'.  The command with the spoken phrase of, 'fire' also has the, 'Restricted Continuous Speech' option enabled.  Next, let's say that you want to execute the, 'fire on my command' command. So, you start to say the phrase and as soon as the word, 'fire' is spoken, the shortcutting is already working and the 'fire' command will most likely be executed (I say most likely because if you speak really fast you might be able to get, 'fire on my command' to execute lol).  The second penalty is that since there is some shortcutting going on, the confidence level emitted by the speech engine will drop - that means that you will need to adjust any minimum confidence levels that you have for commands that use the 'Restricted Continuous Speech' option.  This will require a bit of trial and error, but once you find the magic balance, you'll be using this option a lot (it's one of my favorite things in VoiceAttack).

The second way to improve speed is by affecting the speed in which a command's actions are executed.  VoiceAttack tries to be a good neighbor - both in how it treats the environment that its in as well as how its commands interact with one another.  This has the obvious positive effects, but there's always a penalty - in this case, it's the overall execution speed of the command.  Effectively, speed bumps are put in various places so that VoiceAttack's commands do not chew up too many resources on your system or impede asynchronous commands from running properly.  For instance, speed restrictions are most notably required to have in place when a command either loops continuously, or loops for a long period of time before it finally stops.  Without restriction, those types of commands would use up a lot of resources.  Although great for *this* type of situation, VoiceAttack doesn't know what kind of command you are creating and applies the same speed restrictions to all commands by default.  That means if you have a command that only loops for a short burst or has a long list of actions to perform (or even a short list), that command will be treated the same as a command that loops forever.  To get around this, the 'Resource Balance Offset' option was added.  It is located under the, 'Advanced' button on your command's edit screen.  Selecting this will remove some of the speed restrictions that affect, 'normal' commands.  The penalty for using this option will be the opposite of not using it - the resource usage of the command will go up.  However, if you're very careful about what commands use this feature, the resource spikes will be very minimal and the only thing you'll notice is that commands execute way, way faster.  If you're not careful, of course, you'll notice that resource usage will go up (I know you'll be careful - that's why the option was added ;))

I hope those two somewhat obscure features help enrich your day-to-day usage of VA ;)