采用Android语音识别的API从谷歌玻璃 [英] Using Android Speech Recognition APIs from Google Glass

查看:276
本文介绍了采用Android语音识别的API从谷歌玻璃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作,以适应现有的Andr​​oid应用程序在谷歌玻璃运行,作为对概念的证明。我想用语音输入在我的应用程序,以取代一些功能,目前需要触摸输入。

I'm working to adapt an existing Android application to run on Google Glass, as a proof of concept. I would like to use voice input in my application to replace some features that currently require touch input.

我可以部署我的APK到谷歌玻璃和运行没有问题(亚行),但一旦它的运行,无论是Android的语音识别API,我试过在玻璃作品:

I can deploy my APK to Google Glass and run it without a problem (through ADB), but once it's running, neither Android speech recognition API I've tried works on Glass:

startActivityForResult(new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH));

这导致ActivityNotFoundException(无活动处理的意图)对谷歌玻璃上运行时

This results in an ActivityNotFoundException ("no activity found to handle intent") when running on Google Glass

SpeechRecognizer.IsRecognitionAvailable(context);

这总是对谷歌玻璃返回false。

This always returns false on Google Glass.

我很好奇,如果任何人遇到了这些问题,或者有任何建议。

I'm curious if anyone else has run into these issues or has any suggestions.

推荐答案

要使用标准的Andr​​oid语音识别,你必须安装/部署的 com.google.android.voicesearch APK包。

To use the standard android speech recognition you have to install/deploy the com.google.android.voicesearch apk package.

我不知道是否有一个正式的方式得到这一点。我只是用Google搜索的apk文件。

I don't know if there is an official way to get this. I just googled the apk file.

只需使用 ADB安装&LT安装; APK文件>

然后,你应该能够采用Android的语音识别功能的玻璃设备上。

Then you should be able to use the voice recognition feature of android on your glass device.

另一种方法是使用谷歌的玻璃,如的非常酷的功能只是说:好吧玻璃启动语音识别。

Another way is to use the very cool features of google glass, e.g. to just say "okay glass" to activate the voice recognition.

但因此,你必须根您的设备并激活这个所谓的实验室功能。

But therefore you have to root your device and activate this so called lab-feature.

这一边是一个很好的起点实验室功能的激活:<一href="http://www.glassxe.com/2013/05/29/playing-with-the-labs-features-on-google-glass/">glassxe

This side is a good starting point for the activation of lab features: glassxe

我还没有尝试过我自己,但我要。

I have not tried it by myself but I am going to.

这篇关于采用Android语音识别的API从谷歌玻璃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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