I'm building a Google Glass app. I have tried to catch the user voice trigger (aka "OK Glass") in one of my immersions, but found no way. I have tried listener, intent-filter - but non of them was triggered. I know it can be done in static and live cards. Is it possible in immersions as well? using gdk ?
Asked
Active
Viewed 211 times
1 Answers
1
Contextual voice commands are not yet supported by the GDK. There is a feature request that you can follow here: https://code.google.com/p/google-glass-api/issues/detail?id=273
However, the necessary features are already available in some libraries and you can use them as long as the GDK doesn't support this natively. I've described the necessary steps to extract and use the library in this answer: Glass voice command nearest match from given list

Community
- 1
- 1

blueshadow
- 401
- 3
- 8
-
so how come cards support it? or am i missinf something? – Elad Benda Jan 23 '14 at 23:47
-
What card voice commands do you mean? Besides the "ok glass" voice triggers to start your app there's only the speech recognition activity: https://developers.google.com/glass/develop/gdk/input/voice#starting_the_speech_recognition_activity – blueshadow Jan 24 '14 at 06:49
-
I mean like "Ok glass, send email to support" while in my immersion. Is it posible? – Elad Benda Jan 24 '14 at 07:28
-
Currently this is only possible by including the GlassVoice library like I explained here: http://stackoverflow.com/questions/21168267/glass-voice-command-nearest-match-from-given-list/21251558#21251558 Instead of instantiating the items array with colors you should specify your voice commands ("send email to support"). The speech recognition will recognize these voice commands and call the `onVoiceCommand(VoiceCommand vc)` function. – blueshadow Jan 24 '14 at 08:27