static void Gesture_GestureRecognized(object sender, EventArgs e) { WaveGesture wg = new WaveGesture(); ThankuGestu tg = new ThankuGestu(); handJoinGestu ng = new handJoinGestu(); WhatGesture whatg = new WhatGesture(); //byeGestu bg = new byeGestu(); if (sender.GetType().Name.ToString().Equals(wg.GetType().Name.ToString())) { Console.WriteLine("Hello!!"); using (SpeechSynthesizer synth = new SpeechSynthesizer()) { synth.Speak("Hello"); } } else if (sender.GetType().Name.ToString().Equals(tg.GetType().Name.ToString())) { Console.WriteLine("Thanku!"); using (SpeechSynthesizer synth = new SpeechSynthesizer()) { synth.Speak("Thank You"); } } else if (sender.GetType().Name.ToString().Equals(ng.GetType().Name.ToString())) { Console.WriteLine("namaste"); using (SpeechSynthesizer synth = new SpeechSynthesizer()) { synth.Speak("namaste"); } } else if (sender.GetType().Name.ToString().Equals(whatg.GetType().Name.ToString())) { Console.WriteLine("What is"); using (SpeechSynthesizer synth = new SpeechSynthesizer()) { synth.Speak("What is"); } } /* else if (sender.GetType().Name.ToString().Equals(bg.GetType().Name.ToString())) * { * Console.WriteLine("Bye"); * using (SpeechSynthesizer synth = * new SpeechSynthesizer()) * { * synth.Speak("bye"); * } * }*/ }