Android语音识别API
我正在开发一个需要语音识别才能保持的应用程序 活跃整整一分钟。在查看文档后,我发现 2.2 中添加了“SPEECH_INPUT_MINIMUM_LENGTH_MILLIS”。然而 谷歌默认的语音识别服务似乎不支持。有谁知道办法吗 我可以强制语音识别持续一分钟吗?
I am developing an app that requires the voice recognition to stay
active for an entire minute. Upon reviewing the docs, I discovered
"SPEECH_INPUT_MINIMUM_LENGTH_MILLIS" added to 2.2. However
Google's default voice recognition service doesn't seem to support it. Does anybody know a way
that I could force voice recognition to last a minute?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哦,哇,我讨厌蹩脚的文档。显然Google的语音识别服务确实支持SPEECH_INPUT_MINIMUM_LENGTH_MILLIS,但要求输入很长。当然,如果你在添加额外值时输入一个整数,它会调用寻找 int 的方法。然后它会抛出一个非常令人讨厌的无声错误。只要确保你将数字转换为长整型,世界就会变得美好。
Oh wow I hate crappy documentation. Apparently Google's voice recognition service does support SPEECH_INPUT_MINIMUM_LENGTH_MILLIS, but requires the input to be a long. Of course if you put in an integer when adding the extra, it will call the method looking for an int. Then it will throw a very nasty silent error. Just make sure you cast the number as a long, and the world will be good.