6
How do I use Speech Recognition when my OS(Windows 8 x64) is in En-BR? I want to use commands in English.
I’m using the following code:
private void Form1_Load(object sender, EventArgs e)
{
SpeechRecognizer sr = new SpeechRecognizer();
Choices commands = new Choices();
commands.Add("hi", "test");
GrammarBuilder gb = new GrammarBuilder();
gb.Append(commands);
Grammar g = new Grammar(gb);
sr.LoadGrammar(g);
sr.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(sr_SpeechRecognized);
}
void sr_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
{
textBox1.Text = e.Result.Text;
}
But it makes a mistake in the sr.LoadGrammar(g)
An unhandled Exception of type 'System.Platformnotsupportedexception' occurred in System.Speech.dll
Additional information: No recognizer installed."
You want to use the recognition in Portuguese or even in English?
– Jéf Bueno
Yes, in English.
– Jonathan Barcela
A tip, instead of posting photos of the error, post the code as text, so it makes it easier for people and searchers to find their doubt by the text of the error message.
– Guilherme Nascimento
Which version of windows?
– Guilherme Nascimento
Windows 8 x64..
– Jonathan Barcela