Beispiel #1
0
    void Start()
    {
        _pocketSphinx.SetAcousticModelPath("en-us-ptm");
        _pocketSphinx.SetDictionaryPath("cmudict-en-us.dict");
        _pocketSphinx.SetKeywordThreshold(0.1f);
        _pocketSphinx.AddBoolean("-allphone_ci", true);

        _pocketSphinx.AddKeywordSearchPath(KWS_SEARCH, "menu.gram");
        _pocketSphinx.SetupRecognizer();
    }
Beispiel #2
0
    public void SetUp(List <string> paths)
    {
        if (paths == null || paths.Count == 0)
        {
            return;
        }

        _pocketSphinx.SetAcousticModelPath("en-us-ptm");
        _pocketSphinx.SetDictionaryPath("cmudict-en-us.dict");
        _pocketSphinx.SetKeywordThreshold(0.1f);
        _pocketSphinx.AddBoolean("-allphone_ci", true);

        //register paths from conversations
        for (int i = 0; i < paths.Count; i++)
        {
            _pocketSphinx.AddKeywordSearchPath(paths[i], paths[i] + ".gram");
        }

        currentSearchKey = paths[0];

        _pocketSphinx.SetupRecognizer();
    }