Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Android Speech Recognition APIs from Google Glass

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.

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));

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

SpeechRecognizer.IsRecognitionAvailable(context);

This always returns false on Google Glass.

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

like image 311
Malcolm Smith Avatar asked Jul 01 '13 21:07

Malcolm Smith


People also ask

Is Google Glass still supported?

Yes. How long will the final update be available? The update will be available until February 25, 2022.

How do you interact with Google Glass?

Activate Glass: Tap the touchpad to turn the display on. Swipe forward and back: Swipe forward to move right on your timeline, swipe backwards to move left through items on your timeline. To quickly navigate your timeline, swipe with two fingers, and you'll see a zoomed out view of the timeline.

Can Google Glass take calls?

The ability to sync the glasses to calendars stored on phones or computers in order to receive reminders of events and meetings. Support of both voice and video calls.


2 Answers

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

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

Just install it by using adb install < apk-file >

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.

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.

like image 149
Subby Avatar answered Oct 13 '22 15:10

Subby


It should be noted that now RecognizerIntent.ACTION_RECOGNIZE_SPEECH just works on Glass and does not require the com.google.android.voicesearch package. If you have installed it, you should uninstall it and use the built-in support.

like image 26
Tony Allevato Avatar answered Oct 13 '22 15:10

Tony Allevato