Im using windows 7 and Visucal c# Express edition 2008 with .Net 3.5
This is the code:
using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows. Forms;
using System.Speech;
using System.Speech.S ynthesis;
using System.Speech.R ecognition;
using System.Speech.R ecognition.Srgs Grammar;
namespace Speech_Recognit ion
{
public partial class Form1 : Form
{
Choices myChoices;
GrammarBuilder myGrammerBuilde r;
Grammar myGrammer;
SpeechSynthesiz er mysynt;
SpeechRecognize r myspeech;
public Form1()
{
InitializeCompo nent();
myChoices = new Choices();
mysynt = new SpeechSynthesiz er();
myspeech = new SpeechRecognize r();
myspeech.Speech Recognized += rec_SpeechRecog nized;
}
private void Form1_Load(obje ct sender, EventArgs e)
{
myChoices.Add(" please");
myGrammerBuilde r = new GrammarBuilder( myChoices);
myGrammer = new Grammar(myGramm erBuilder);
myspeech.LoadGr ammar(myGrammer );
myspeech.Enable d = true;
}
void rec_SpeechRecog nized(object sender, SpeechRecognize dEventArgs e)
{
myLetters.Text = e.Result.Text;
}
}
}
I tried using my microphne but it dosent help i said please many times and nothing happened.
What did i do wrong? I thought its something to do with culture settings but i couldnt find how to set it up.
Thanks for helping
This is the code:
using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows. Forms;
using System.Speech;
using System.Speech.S ynthesis;
using System.Speech.R ecognition;
using System.Speech.R ecognition.Srgs Grammar;
namespace Speech_Recognit ion
{
public partial class Form1 : Form
{
Choices myChoices;
GrammarBuilder myGrammerBuilde r;
Grammar myGrammer;
SpeechSynthesiz er mysynt;
SpeechRecognize r myspeech;
public Form1()
{
InitializeCompo nent();
myChoices = new Choices();
mysynt = new SpeechSynthesiz er();
myspeech = new SpeechRecognize r();
myspeech.Speech Recognized += rec_SpeechRecog nized;
}
private void Form1_Load(obje ct sender, EventArgs e)
{
myChoices.Add(" please");
myGrammerBuilde r = new GrammarBuilder( myChoices);
myGrammer = new Grammar(myGramm erBuilder);
myspeech.LoadGr ammar(myGrammer );
myspeech.Enable d = true;
}
void rec_SpeechRecog nized(object sender, SpeechRecognize dEventArgs e)
{
myLetters.Text = e.Result.Text;
}
}
}
I tried using my microphne but it dosent help i said please many times and nothing happened.
What did i do wrong? I thought its something to do with culture settings but i couldnt find how to set it up.
Thanks for helping
Comment