Android 语音识别
嘿伙计们,我想知道是否可以翻译音频而不必调用识别器意图(即一个表示您正在录制音频的对话框)。我希望能够每 2 到 3 秒左右恢复一次语音识别的结果,并计划将其与一堆列表视图一起使用。这可能吗?如果有的话有什么想法吗?谢谢!
编辑:我忘了提到我正在使用 android.speech.SpeechRecognizer,但到目前为止,在我的 RecognitionListener 接口的实现中,我从 ddms 得到的只是存在客户端错误。似乎没有其他的名字了。另外,我是否必须实现 RecognitionService?我知道 API 中的示例就是这样。如果是这样,我将如何创建和使用这项服务?再次感谢。
Hey guys, I was wondering if it were possible to translate audio without having to call a recognizer intent (ie a dialog that says you are recording audio). I want to be able to recover the results of the voice recognition every 2 to 3 seconds or so and plan to use this with a bunch of listviews. Is this possible? If so any ideas? Thanks!
Edit: I forgot to mention that I am playing around with android.speech.SpeechRecognizer but so far, in my implementation of the RecognitionListener interface all I have been able to get from ddms is that there is a client side error. Nothing else seems to be called. Also, is it essential that I implement a RecognitionService? I know that the example in the API is just that. If so, how would I create and use this service? Thanks again.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
语音识别在模拟器中不起作用。你需要一个设备。
Speech recognition does not work in the Emulator. You need a device.
我刚刚在另一个线程中发布了一些工作代码框架 -
Android 语音识别命令
语音识别器可以每隔几秒触发一次,无需 UI。您可能需要编写自己的代码来决定何时适合录制,何时不适合(您会获得一个可以查看的音频缓冲区) - 或者您可以在自己的 UI 中执行某些操作。
我认为你可以一遍又一遍地重新触发它。不确定它是否能完美工作,但值得一试。
I just posted some working code skeleton stuff in another thread -
Voice Recognition Commands Android
The speech recognizer can be triggered every few seconds without UI. You might need to write your own code to decide when is good to record and when is not (you get an audio buffer you could peek through) - or your could do something in your own UI.
I think you could re-trigger it over and over again. Not sure it'd work perfectly but worth a try.
在Android中这是不可能的< 2.1 和可能在 2.2 中
当我问 Google 支持人员时,他说,“也许你可以弄清楚正在发送哪些数据包,然后直接进行网络调用”
哇。
It is impossible in Android < 2.1 and probably in 2.2
When I asked a Google support person, he said, "Maybe you can figure out what packets are being sent and then just make a direct web call"
Wow.