Microsoft Speech Recognition setInputToDefaultAudioDevice throws exception

后端 未结 1 1371
滥情空心
滥情空心 2021-01-06 08:43

hello guys I\'m in trouble in MS Speech recognition.

my code is simple.

static void init()
    {
        string enUsEngine = string.Empty;


                 


        
相关标签:
1条回答
  • 2021-01-06 09:39

    Most probably you are using Microsoft.Speech.Recognition and you reall should be using System.Speech.Recognition.

    Change this:

    using Microsoft.Speech.Recognition;
    

    to this:

    using System.Speech.Recognition;
    

    You can leave the rest of the code as it is.

    Wh? Well here are some answers: What is the difference between System.Speech.Recognition and Microsoft.Speech.Recognition?

    In short Microsoft.Speech.Recognition is for servers and works with low quality audio like you find in call centres (used for automation etc.), this means it is not compatible with all audio input devices.

    On contrary System.Speech.Recognition is for Desktop apps and it fully supports default recording devices installed on Windows.

    0 讨论(0)
提交回复
热议问题