hello everyone...
i am working on "WINDOWS FORMS, C#"
sorry to bother you, but i have to display my project in which i am working on "speech recognition" i actually want to draw a shape (in built in C# like circle), when a user asks to make it, can anyone tell me the syntax to connect the two logics,
1; recognize speech
2; draw circle
the coding modules i have made are,
FOR SPEECH RECOGNITION
using System.Speech.AudioFormat;
using System.Speech;
namespace speechexampl
{
public 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;
}
void Form1_Load(object sender, EventArgs e)
{
var c = new Choices();
for (var i = 0; i <= 100; i++)
c.Add(i.ToString());
var gb = new GrammarBuilder(c);
var g = new Grammar(gb);
rec.LoadGrammar(g);
rec.Enabled = true;
}
FOR DRAWING OBJECTS
Pen myPen2 = new Pen(System.Drawing.Color.Red, 3);
Rectangle myRectangle2 = new Rectangle(95, 130, 100, 100);
graphicsObj.DrawEllipse(myPen2, myRectangle2);