I have a problem with the SpeechRecognizer class on Windows XP. sometimes it works, but sometimes it does not work, and it needs to restart the computer. on windows 7 it works fine. I think that some problems are in the speech engine itself, because when I launch my application several times, it stops working.
Im using this code:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; Using SpeechLib using System.Threading;
WindowsFormsApplication13 namespace {open partial class Form1: Form {
SpeechRecognizer rec = new SpeechRecognizer(); public Form1() { InitializeComponent(); rec.SpeechRecognized += rec_SpeechRecognized; } void rec_SpeechRecognized(object sender, SpeechRecognizedEventArgs e) { lblLetter.Text = e.Result.Text; } private void Form1_Load(object sender, EventArgs e) { var c = new Choices(); c.Add("one"); c.Add("two"); c.Add("three"); c.Add("four"); c.Add("Five"); c.Add("six"); c.Add("seven"); c.Add("eight"); c.Add("nine"); c.Add("ten");
}
Zviadi
source share