UnityASR icon indicating copy to clipboard operation
UnityASR copied to clipboard

Hotword detection

Open nixonyh opened this issue 4 years ago • 0 comments

Summary

DeepSpeech allow us to add bias to a word. We can use this feature to create a simple hotword detection.

Intended Outcome

  • What is the use case of this?
    • Agent able to recognize its name.
    • Hotword based commands.

How will it work?

_sttClient = new DeepSpeech(FileUtil.GetStreamingAssetFilePath(modelPath));
_sttClient.EnableExternalScorer(FileUtil.GetStreamingAssetFilePath(externalScorerPath));
// If you want to add bias to a word. Only supports single words.
_sttClient.AddHotWord("cue", 20.0f);

// You can also add a negative value
_sttClient.AddHotWord("cue",-250.0f);

nixonyh avatar Sep 13 '21 04:09 nixonyh