安卓:监听语音命令(所有的时间) [英] Android: Listen for a voice command (all the time)

查看:846
本文介绍了安卓:监听语音命令(所有的时间)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个相当流行的应用程序在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?

在此先感谢。

推荐答案

<一个href="http://www.google.com/$c$csearch#x52z1BhkgOA/trunk/NoiseAlert/src/com/google/android/noisealert/NoiseAlert.java&q=wakelock%20package%3ahttp://android-labs%5C.google$c$c%5C.com&l=59"相对=nofollow> 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.

这篇关于安卓:监听语音命令(所有的时间)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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