المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Speech Recognition for vista and xp too using c# 2008



C# Programming
11-08-2009, 12:50 PM
Hello to everyone,
I want to develop Speech recognition application for vista and xp too, like if i say "Open Notepad", notepad should be open. For that i have use system.speech.recognition, but when i run my application, default speech recognition gets opened. My code is:
SpeechRecognizer rec = new SpeechRecognizer();
private void Form1_Load(object sender, EventArgs e)
{
//for recognize
Choices c = new Choices();
c.Add("Close");
c.Add("Pause");
c.Add("Stop");
var gb=new GrammarBuilder(c);
var g=new Grammar(gb);
rec.SpeechRecognized +=new EventHandler(rec_SpeechRecognized);
rec.LoadGrammar(g);
rec.Enabled=true;
}
private void rec_SpeechRecognized(Object sender, SpeechRecognizedEventArgs e)
{
MessageBox.Show(e.Result.ToString());
}

I am developing this application in vista, but i want this should be run also in xp.
Please help me for this,
Thank you in advance.