Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

speech recognition in C# for urdu language

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();
        }
    }
like image 238
Kashif Ijaz Avatar asked Nov 21 '25 14:11

Kashif Ijaz


1 Answers

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.

like image 195
Bao Nguyen Avatar answered Nov 23 '25 04:11

Bao Nguyen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!