Esempio n. 1
0
        public void initKeywordsWithRooms()
        {
            keywords2 = new Dictionary <string, System.Action>();
            var keylist = sman.linkcloudctrl.GetKeywordKeys();
            int nadded  = 0;

            foreach (var key in keylist)
            {
                var val = sman.linkcloudctrl.GetKeywordValue(key);
                keywords2.Add(key, () => { sman.NodeAction(val); });
                nadded += 1;
                RegionMan.Log("Adding key:" + key + "  Val:" + val);
            }
            if (kR2 != null)
            {
                kR2.Stop();
                kR2.Dispose();
                kR2 = null;
            }
            if (keywords2.Count > 0)
            {
                kR2 = new KeywordRecognizer(keywords2.Keys.ToArray());
                kR2.OnPhraseRecognized += kROnPhraseRecognized2;
                kR2.Start();
            }
            RegionMan.Log("keywords rooms num keys:" + keywords2.Count);
        }