语音识别质量极差,尤其是与Word相比

c#

我正在使用 WPF 语音识别库,试图在桌面应用程序中使用它作为菜单命令的替代方案。(我想专注于没有键盘的平板电脑体验)。它有效 - 有点,除了识别的准确性太差以至于无法使用。所以我试着听写成 Word。Word 运行得很好。我在这两种情况下都使用我的内置笔记本电脑麦克风,并且两个程序都能够同时听到相同的语音(前提是 Word 保留键盘焦点),但 Word 做得对,WPF 做得很糟糕。

我尝试了通用 DictationGrammar() 和微小的专用语法,并且尝试了“en-US”和“en-AU”,在所有情况下,Word 都表现良好,而 WPF 表现不佳。即使将 WPF 中的专业语法与 Word 中的一般语法进行比较,WPF 也有 50% 的错误率,例如将“size small”听成“color small”。

    private void InitSpeechRecognition()
    {
        recognizer = new SpeechRecognitionEngine(new System.Globalization.CultureInfo("en-US"));

        // Create and load a grammar.  
        if (false)
        {
            GrammarBuilder grammarBuilder = new GrammarBuilder();
            Choices commandChoices = new Choices("weight", "color", "size");
            grammarBuilder.Append(commandChoices);
            Choices valueChoices = new Choices();
            valueChoices.Add("normal", "bold");
            valueChoices.Add("red", "green", "blue");
            valueChoices.Add("small", "medium", "large");
            grammarBuilder.Append(valueChoices);
            recognizer.LoadGrammar(new Grammar(grammarBuilder));
        }
        else
        {
            recognizer.LoadGrammar(new DictationGrammar());
        }

        // Add a handler for the speech recognized event.  
        recognizer.SpeechRecognized +=
                            new EventHandler<SpeechRecognizedEventArgs>(recognizer_SpeechRecognized);

        // Configure input to the speech recognizer.  
        recognizer.SetInputToDefaultAudioDevice();

        // Start asynchronous, continuous speech recognition.  
        recognizer.RecognizeAsync(RecognizeMode.Multiple);
    }

Word 的示例结果:

Hello 
make it darker 
I want a brighter colour 
make it reader 
make it greener 
thank you 
make it bluer 
make it more blue
make it darker 
turn on debugging 
turn off debugging 
zoom in 
zoom out 

WPF中相同的音频,听写语法:

a lower
make it back
when Ted Brach
making reader
and he
liked the
ethanol and
act out
to be putting
it off the parking
zoom in
and out

我使用 Nuget 获得了程序集。我正在使用运行时版本 = v4.0.30319 和版本 = 4.0.0.0。如果我应该“训练”它,文档没有解释如何做到这一点,我不知道训练是否与 Word 等其他程序共享,或者训练的保存位置。我已经玩了很长时间了,现在它已经知道我的声音了。

谁能告诉我我做错了什么?

以上是语音识别质量极差,尤其是与Word相比的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>