Beispiel #1
0
        static void engine_RecognizeCompleted(object sender, System.Speech.Recognition.RecognizeCompletedEventArgs e)
        {
            DMDocument  doc       = new DMDocument();
            DMParagraph paragraph = new DMParagraph();


            DictationSyncEngine engine = sender as DictationSyncEngine;

            if (engine != null)
            {
                for (int i = 0; i < engine.Result.Count; i++)
                {
                    var        sentence   = engine.Result[i];
                    DMSentence dmSentence = BuildSentence(i, sentence);
                    paragraph.Inlines.Add(dmSentence);
                }

                doc.Blocks.Add(paragraph);
            }

            doc.Save(Path.Combine(Environment.CurrentDirectory, "data.xml"));

            Console.WriteLine("Recognize Completed!");

            Console.WriteLine("Press any key to exists!");
        }
Beispiel #2
0
        void SyncEngine_RecognizeCompleted(object sender, System.Speech.Recognition.RecognizeCompletedEventArgs e)
        {
            if (this._notifyDictationProgress != null)
            {
                this._notifyDictationProgress.RecognizeCompleted();
            }

            if (e != null)
            {
                myResetEvent.Set();
            }
        }