3

Please correct me if i am wrong actually i am beginner developer. I want to write a speech recognition algorithm for my university project. I want to write speech recognition algorithm for urdu language. Till is it in my mind is that first i should create a urdu grammar. then train the speech recognition engine then detect the word. what i have tried yet...!

  • I have written speech recognition algorithm for english.
  • I have written 2 words grammar to recognize.

That algorithm is working. So what i should change in the algorithm for recognizing urdu language or to create a urdu grammar. Please guide me where to start.

static void RecognizeSpeechAndMakeSureTheComputerSpeaksToYou()
    {
        _recognizer = new SpeechRecognitionEngine();
        _recognizer.LoadGrammar(new Grammar(new GrammarBuilder("hello computer"))); // load a "hello computer" grammar
        _recognizer.SpeechRecognized += _recognizeSpeechAndMakeSureTheComputerSpeaksToYou_SpeechRecognized; // if speech is recognized, call the specified method
        _recognizer.SpeechRecognitionRejected += _recognizeSpeechAndMakeSureTheComputerSpeaksToYou_SpeechRecognitionRejected;
        _recognizer.SetInputToDefaultAudioDevice(); // set the input to the default audio device
        _recognizer.RecognizeAsync(RecognizeMode.Multiple); // recognize speech asynchronous
    }
    static void _recognizeSpeechAndMakeSureTheComputerSpeaksToYou_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
    {
        if (e.Result.Text == "testing")
        {
            SpeechSynthesizer speechSynthesizer = new SpeechSynthesizer();
            speechSynthesizer.Speak("test completed");
            speechSynthesizer.Dispose();
        }
    }
Kashif Ijaz
  • 45
  • 11
  • you will need to make a new grammar engine(or reconfigure the one for english), and after that you should be able to continue how ever you did to get english working and it should work perfectly – mjz19910 Aug 26 '15 at 10:54

1 Answers1

1

Microsoft Speech doesn't support Urdu language. And you can't add your own language to the engine. You need to start building your own speech recognition engine. It's a huge task. If you want how to start, you can check this link.

Community
  • 1
  • 1
Bao Nguyen
  • 137
  • 9