为什么我的 Microsoft 语音识别结果的置信度始终等于 -1?
我正在使用 Microsoft Speech SDK 来实现一个使用语音识别的软件。
我向识别引擎提供了非常正常的语法,但是当启动引擎并说出正确的内容时,它会识别我所说的内容,但返回的 Result 对象的置信度值为 -1。
此外,结果中包含的所有 SemanticValue 对象也具有 -1 置信度。
我在相关的MSDN页面中找不到这样的结果的含义,实际上它只是写的是典型的置信度值应该在0和1之间。
-1值是什么意思?和语法有关系吗?
编辑:附加信息:
- 我正在使用 System.Speech 类与语音识别引擎交互。
- 识别引擎是Microsoft English Recognizer v5.1。
- 我在 XP 上运行该程序,因此语音 SDK 也是 5.1。
- 输入是麦克风输入:我没有找到向该识别引擎提供文件的可能性的踪迹,尽管它会对我有很大帮助。
I am using the Microsoft Speech SDK to implement a software using voice recognition.
I feed the recognition engine with a quite normal grammar, but when starting the engine and saying something correct, it recognizes what i say but the returned Result object has a Confidence value of -1.
Besides, all SemanticValue objects contained in the result also have a -1 confidence.
I cannot find a trace of the meaning of such a result in the related MSDN pages, and actually it is just written that typical confidence values should be between 0 and 1.
What does a -1 value mean ? Does it have something to do with the grammar?
Edit : Additional infos :
- I am using the System.Speech classes to interact with the voice recognition engine.
- The recognition engine is Microsoft English Recognizer v5.1.
- I am running the program on XP and thus the Speech SDK is also 5.1.
- The input is a microphone input: I did not find trace of the possibility to feed this recognition engine with a file, although it would have helped me a lot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 SAPI 中,SREngineConfidence 尝试将短语置信度从供应商特定的语音引擎传递到独立于引擎的 SAPI 客户端。 SREngineConfidence 有一些有趣的行为,请参阅“Microsoft Speech SDK Version 5.1 SR Engine Vendor Porting Guide”
http://msdn.microsoft.com/en-us/library/ee431799(v=VS.85).aspx#_Toc503606917 说:
,后面说:
另一种可以为您提供一些见解的资源是 http://gotspeech.net/forums/thread/3613.aspx。一篇帖子说:
编辑:
我相信 System.Speech.Recognition 实际上是 SAPI 的 .net 包装器(请参阅 http://msdn.microsoft.com/en-us/magazine/cc163663.aspx)。我怀疑上面引用的描述置信度为 -1 的评论可能仍然适用于使用 System.Speech 的您。我猜您看到的 -1 与提到的问题相同。
我的理解是 XP 不包含识别器。 Microsoft Office 版本随之而来。所以,我不确定您真正运行的是哪个识别器引擎。您安装了Office 2003吗?或者您是否安装了像 Dragon 这样的第 3 方引擎?
你说你安装了识别器5.1。上面的 GotSpeech.NET 链接说:
我建议尝试以下操作:
还要添加一项。以下是从 wav 文件中识别的简短示例:
In SAPI the SREngineConfidence is an attempt to pass the phrase confidence from the vendor specific speech engine to the engine independent SAPI client. SREngineConfidence has some interesting behavior described in "Microsoft Speech SDK Version 5.1 SR Engine Vendor Porting Guide"
http://msdn.microsoft.com/en-us/library/ee431799(v=VS.85).aspx#_Toc503606917 says:
and later says:
One other resource that may give you some insight is http://gotspeech.net/forums/thread/3613.aspx. One post says:
Edits:
I believe System.Speech.Recognition is really a .net wrapper around SAPI (see http://msdn.microsoft.com/en-us/magazine/cc163663.aspx). I suspect that the comments quoted above that describe confidence levels of -1 may still apply to you using System.Speech. I'm guessing that the -1 you are seeing is the same issue mentioned.
My understanding is that XP did not include a recognizer. Versions of Microsoft Office came with it. So, I'm not sure which recognizer engine you are really running. Do you have Office 2003 installed? or do you have a 3rd party engine like Dragon installed?
You say you have recognizer 5.1 installed. The GotSpeech.NET link above says:
I would suggest trying the following:
One more piece to add. Here is a short sample to recognize from a wav file: