Utterly Voice icon image Utterly Voice

Bias

In both your mode and your command settings, you can set bias values that can increase or decrease the likelihood of certain phrases from being recognized. This is very helpful when you want to boost the recognition of commands or phrases you say often, or you want certain phrases to be ignored because they are frequently a result of inaccurate recognition.

Recognition Confidence Score link icon

When an utterance is sent to a recognizer, most recognizers return a list of possible matches with a confidence score for each possible match. This is a numeric value, where higher numbers imply higher confidence that the match is correct. Utterly Voice uses these confidence scores and bias values that you provide to select the best match. Once the bias values have been applied to the possible matches, Utterly Voice chooses the best match.

Command Name Bias link icon

Each command in the commands for your mode files has an optional biasFactor number setting. When Utterly Voice is selecting a possible match for an utterance, it multiplies the confidence score by the value for biasFactor for each possible match that contains the command name. If not supplied, the default bias factor is 1.2. For example, the following command has a bias factor of 1.4:

Any possible match that contains "dollar sign" will have the confidence score increased by 40% before selecting the best match.

Regular Expressions link icon

The next section on this page requires a basic understanding of regular expressions. Regular expressions can be fairly complex, and if you are not a programmer, you probably have never heard of them. However, if you just learn a few basic concepts, you can apply them effectively with Utterly Voice. A regular expression is a text pattern that can be applied to arbitrary text to check if there is a match. For example, if a regular expression is 'ape', the following phrases are a match, because they each contain that sequence of letters:

  • "ape man"
  • "grape"
  • "raised by apes"

Regular expressions can use special character sequences to be more specific about pattern matching. Here are some that are useful for Utterly Voice:

Sequence Description
^ Matches the beginning of text.
$ Matches the end of text.
\b Matches a word boundary.
\w Matches any word character (alphanumeric characters plus underscore).

For example:

Regular Expression Matches Does Not Match
'^ape' "ape man"
"apex predator"
"the ape"
'the$' "the"
"bathe"
"the gorilla"
'^hello$' "hello" "why hello"
"hello there"
'\bgo up' "i go up"
"go upside down"
"pogo up"
'\bgo up\b' "i go up north" "pogo up"
"go upside down"
'go up \w' "go up north"
"i go up here"
"go up"
"go upside down"

If you would like to create more sophisticated regular expressions, see Regular-Expressions.info.

Phrase Bias link icon

Each mode has an optional setting called biases, which is a list collection. These bias settings are applied to all possible matches for an utterance while the mode is active. Each list item is a map collection that has the following settings:

Setting Type Description
expression String A regular expression that is checked for a match against each possible match returned by the recognizer.
factor Number If the regular expression is a match against the possible match, the confidence score is multiplied by this factor. A number greater than 1 will increase the confidence score, and a number less than 1 will decrease the confidence score.

For example, this is an extract from the basic mode:

If you say "go up ten", and the recognizer returns "go up the ten" as a possible match, this possible match will have its confidence score reduced by 50%. This significantly reduces the probability that "go up the [any word]" will be selected as a match.

Note that the expression settings above use single quotes. This lets you freely use \ in the string values without needing to use an escape sequence. If you changed this to double quotes, the first expression value would become "\\bgo up the \\w". This will work fine, but it is more difficult for you to read.

Monitor Bias in Logs link icon

If you would like to monitor how well bias is being applied, you can look at the log.txt file in the application directory. All utterances and bias applications are logged.