Microsoft.Speech.Recognation and System.Speech.Recognation Plataformnotsupportedexception

Asked

Viewed 2,293 times

4

I’m having a problem with Microsoft.Speech.Recognition and also with the System.Speech.Recognation;

Well, I was able to run the application to support the English language, which in the case is standard in my OS, which is Windows 8.1 (x64), my OS is in English.

The thing is, the application I want is that it recognizes sounds in Portuguese, but for that I had to install these 4 elements in my OS:

  • Microsoft Speech Platform SDK,
  • Msspeech_sr_en-US_TELE,
  • SpeechPlatformRuntime MSSpeech_TTS_en-BR_Heloisa,

Which I saw in a tutorial on youtube, well then I tried to run using the Microsoft.Speech.Recognation made that mistake:

Speech Recognition is not available on this system. SAPI and Speech Recognition Engines cannot be found.

So I tried to use this System.Speech.Recognation and passed the class instance Recognation a Cultura para português Brazil.

SpeechRecognitionEngine recEngine = new SpeechRecognitionEngine(new System.Globalization.CultureInfo("pt-Br"));

But there was this other mistake :

No recognizer installed.

I do not know if it has to do with windows Speech Recognition, because on computers that are installed in Portuguese have 3 languages in voice recognition, there in Control Panel.

Well, like I wanted at least one of them to work.

Follow a little code below:

private void btnEnable_Click(object sender, EventArgs e)
    {
        recEngine.RecognizeAsync(RecognizeMode.Multiple);
        btnDisable.Enabled = true;
    }

    private void btnDisable_Click(object sender, EventArgs e)
    {
        recEngine.RecognizeAsyncStop();
        btnDisable.Enabled = false;

    }
    private void Form1_Load(object sender, EventArgs e)
    {
        Choices commands = new Choices();
        commands.Add(new string[] { "carro", "print my name"  , "joab" , "maria"});
        GrammarBuilder gBuilder = new GrammarBuilder();
        gBuilder.Append(commands);
        Grammar gramar = new Grammar(gBuilder);

        recEngine.LoadGrammarAsync(gramar);
        recEngine.SetInputToDefaultAudioDevice();
        recEngine.SpeechRecognized += recEngine_SpeechRecognized; 


    }

    private void recEngine_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
    {
        switch (e.Result.Text) { 

            case "carro":
                MessageBox.Show("Hello Jhon how are you ?");
                break;
            case "print my name":
                richTextBox1.Text += "Johon";
                break;
            case "joab":
                MessageBox.Show("Acertou Joab");
                break;
            case "maria":
                MessageBox.Show("Acertou Maria");
                break;





        }
    }

Remembering that this picks up in English.

1 answer

4


In Visual Studio, access the Configuration Manager:

Configuration Manager

Create a new platform:

New Platform

Specify x86 on the platform. The Speech recognition is not yet approved for x64.

x86

  • 1

    It worked ! (y)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.