在C#中改善语音识别-我可以使用wav文件定义自定义语法吗? [英] To Improve Speech Recognition in C# - Can I use wav file to define Custom Grammar?

查看:149
本文介绍了在C#中改善语音识别-我可以使用wav文件定义自定义语法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想改善C#中的语音识别.目前,我正在使用带有某些命令的自定义语法,但是当我说一些单词时,识别引擎会将这些单词与存储在自定义语法中的命令混淆.
在语音识别中,是否可以使用wav文件定义自己的客户语法?我的想法是,如果我可以在自定义语法中记录自己的口音命令,那么SpeechRecognitionEngine可以通过将命令字与自定义语法中存储的命令字进行比较,从而更准确地识别我的命令.

或者是否有一种方法可以告诉识别引擎我将如何发音这些命令,以免将它们与其他类似的发音单词混淆?

谢谢

Kaur

解决方案

您可以使用SpeechSynthesizer Class来发音.

示例C#代码

 System.Speech.Synthesis.SpeechSynthesizer sp =  SpeechSynthesizer();
sp.Speak(" ); 



示例VB代码

  Dim  sp  as   System.Speech.Synthesis.SpeechSynthesizer
sp.Speak(" )


Hi,

I want to improve the speech recongnition in C#. Currently i''m using a custom Grammar with some commands, but when i speak some words, the recognition engine confuses those words with the commands stored in custom grammar.

In Speech Recongnition, is it possible to define your own customer grammar using a wav file? My idea is if I can record commands with my own accent in the Custom grammar, then SpeechRecognitionEngine would recognize my commands more accurately by comparing my commands words with the those stored in the custom grammar.

Or if there is a way to tell Recognition Engine how i would pronounce the commands, so that it doesn''t confuse them with other similar sounding words?

Thank You

Kaur

解决方案

You can use SpeechSynthesizer Class for how to pronounce a word.

Sample C# Code

System.Speech.Synthesis.SpeechSynthesizer sp= new SpeechSynthesizer();
sp.Speak("Hello");



Sample VB Code

Dim sp as new System.Speech.Synthesis.SpeechSynthesizer
sp.Speak("Hello")


这篇关于在C#中改善语音识别-我可以使用wav文件定义自定义语法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆