Android 语音识别

发布于 2024-09-10 00:16:21 字数 315 浏览 3 评论 0原文

嘿伙计们,我想知道是否可以翻译音频而不必调用识别器意图(即一个表示您正在录制音频的对话框)。我希望能够每 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

心碎的声音 2024-09-17 00:16:21

语音识别在模拟器中不起作用。你需要一个设备。

Speech recognition does not work in the Emulator. You need a device.

一世旳自豪 2024-09-17 00:16:21

我刚刚在另一个线程中发布了一些工作代码框架 -

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.

陪我终i 2024-09-17 00:16:21

在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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文