Phrase Biases | Mod9 ASR Engine

[ Overview || TCP | C++ | Python | REST | WebSocket || Models | Customization | Deployment | Licensing ]

Mod9 ASR Engine: Phrase Biases

Phrase biasing can be used to increase or decrease the likelihood of phrases. This has no effect on loaded models; rather, it applies to the results of an individual recognition request. The modification will be applied not just to the transcript, but also to any alternatives (e.g. setting "phrase-alternatives": 5 in a TCP request).

The phrase bias option is passed along with a recognition request. Positive biases mean the phrase is more likely to appear; negative biases mean the phrase is less likely to appear.

The format is best described using an example. Suppose you regularly hold meetings where a participant is named "Geoff Stennis", and it keeps getting misrecognized as Jeff's tennis. At the same time, "mace" plus another words keeps appearing where words like "macy's", "mesa", or "mason" should appear (e.g. "mace sees" instead of "macy's"). You can increase the likelihood of "Geoff Stennis" and decrease the likelihood of "mace" with the command:

(echo '{"command": "recognize",
        "phrase-biases": {
           "geoff stennis": 5,
           "mace": -3 }}' | jq -c;
      cat audio.wav) | nc $HOST $PORT

Biases in the range -10 to 10 are typical. You should try to keep the biases as close to 0 as you can while still being large enough to cause the phrase you desire to appear. This will prevent the phrase from appearing too frequently in the wrong places.

Note that phrase biasing can have a negative effect on performance. This is because it adjusts not just the most likely output (the "one best"), but also all alternatives. Attempting to bias very common words and phrases can exacerbate this effect.

Phrase biasing should only be used to correct mistakes in recognition and not for filtering. For example, you should not attempt to use a negative bias for profanity, as this will cause it to output the second best alternative, which may be gibberish (e.g. "duck you"). Instead, filtering should be done as a post processing step.


©2019-2022 Mod9 Technologies (Version 1.9.5)