Exemplo n.º 1
0
 public static void finalize_all_grammars(Speech_Recognizer engine)
 {
     foreach (Familiar_Document library in all_documents.Values)
     {
         library.create_grammar(engine);
     }
 }
Exemplo n.º 2
0
        public Familiar_Grammar create_grammar(Speech_Recognizer engine)
        {
            //create_cfg_file();
            //Element_Item.init();

            string destination = Global.configuration.temp_path + "/" + Path.GetFileNameWithoutExtension(this.file_name) + ".xml";

            grammar = new Familiar_Grammar(engine);
            grammar.create(this, destination);
            grammar.priority = priority;
            //using (MemoryStream reader = new MemoryStream(System.Text.Encoding.Default.GetBytes(document.InnerXml)))
            //{
            //    reader.Position = 0;
            //    new_grammar = new Grammar(reader);
            //}
            //grammar.recognized += new Recognition_Event(((Action_Library)parent).Familiar_Grammar_recognized);

            return(grammar);
        }