SpeechRecognizer.Settings.InitialSilenceTimeout无法正常工作 [英] SpeechRecognizer.Settings.InitialSilenceTimeout not working right

查看:217
本文介绍了SpeechRecognizer.Settings.InitialSilenceTimeout无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用  SpeechRecognizer类的此属性,但是遇到了问题.

I wanted to use this property of the SpeechRecognizer class but I'm running into issues.

我第一次调用SpeechRecognizer.RecognizeAsync()时,它运行良好,并使用了我分配给该属性的TimeSpan.但是,在第二个呼叫中,它只是挂在捕获"状态中.模式,并在一分钟或两分钟后超时.

The first time I call SpeechRecognizer.RecognizeAsync(), it works well and uses the TimeSpan I'm assigning to the property. However, on the second call it just hangs in "Capturing" mode and times out a minute or 2 later.

有什么想法吗?

推荐答案

谢谢您的举报.这似乎是一个已知问题,已记录在我们的问题数据库中.如果初始识别事件与InitialSilenceTimeout事件大约在同一时间发生,则语音引擎显然会出现问题 状态和下一个识别将永远挂起.

Thank you for reporting this. This appears to be a known problem that has been recorded in our issues database. If the initial recognition event comes in around the same time as the InitialSilenceTimeout event, the speech engine apparently goes into a bad state and the next recognition will hang forever.

在以后的电话操作系统版本中,将考虑对该错误进行纠正,但是现在您应该考虑两种可能的解决方法:

The bug will be considered for correction in a future phone OS build, but for now you should consider the two possible workarounds:

1.将InitialSilenceTimeout值设置为与识别事件不太可能同时发生的值,并管理自己的计时器以取消异步识别.
2.为每次识别尝试配置并建立新的识别引擎.

1. Set InitialSilenceTimeout value to something unlikely to happen at the same time as a recognition event, and manage your own timer to cancel async recognition.
2. Dispose and new up a new recognition engine for every recognition attempt.

希望这会有所帮助,
标记

Hope this helps,
Mark


这篇关于SpeechRecognizer.Settings.InitialSilenceTimeout无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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