安卓:监听语音命令(所有的时间)有的、语音、命令、时间

2023-09-06 04:43:48 作者:初夏▍渲染一季花开

我有一个相当流行的应用程序在Android Market中,这使得它的用户数以万计,以preSS一个按钮,并给它一个声控命令。然后,我可以做许多不同的事情,比如给他们目前的天气预报,等等...

I have a fairly popular application in Android market, which allows tens of thousands of its users to press a button and give it a voice command. Then I am able to do many different things, like give them current weather forecast, etc...

总之,我来到了一个点,我在问,几乎每天都被我的应用程序的用户来说,他们不希望成为pressing一个按钮,所有的时间。他们希望我的应用程序由一个触发字(某些特定的词命令)来启动。这样,应用程序会醒来,要求他们为语音命令,所有的免提。

Anyhow, I came to a point where am getting asked almost every day by users of my app, that they don't want to be pressing a button all the time. They want my app to launch by a trigger word (some specific word command). In that way, app would wake up and ask them for a voice command, all hands free.

据我所知,这将需要不停的听,它可能是一个电池食等,但我想给它一个尝试。总之,这就是为什么我在这里。 我根本不知道该如何去做。

I understand that this would require a nonstop listening, it could be a battery eater, etc. But I want to give it a try. Anyhow, and this is why I am here. I simply don't know how to go about it.

我知道这是可能的,这些家伙做到了,不仅如此,他们听一个触发字,即使手机处于睡眠模式或后面的锁定屏幕:的 http://www.youtube.com/watch?v=Dd2vo_9euOY

I know it's possible, these guys did it and not only that, they listen to a trigger word even when the phone is in the sleeping mode or behind a locked screen: http://www.youtube.com/watch?v=Dd2vo_9euOY

如何能够做到这一点的任何想法?怎么家伙上面做呢? 怎么样?任何的例子吗?

Any ideas on how this could be done? How did the guys above do it? How? Any examples?

在此先感谢。

推荐答案

NoiseAlert 是启动时,有一个响亮的环境噪声的应用程序,它注重的噪声振幅,还包含wakelocks。

NoiseAlert is an Application that launches when there is a loud ambient noise, it pays attention to the noise amplitude and also contains wakelocks.

您可以使用此作为参考。我想你已经实现了Speeck识别部分。

You may use this as an reference. I think you have already implemented the Speeck recognition part.