Integrate Google Voice Recognition in Android app
Asked Answered
H

2

16

I want to introduce a new feature into my app: permanent voice recognition.

First of all I followed these posts:

Voice recognition

Speech recognition in Android

Offline Speech Recognition In Android (JellyBean)

and more others, plus other posts from different websites.

Problem: What actually I'm trying to do is to have a permanent voice recognition without displaying google's voice activity. For example: When I start the application the voice recognition should start and listen. When the recognizer matches some words then my app will do different actions accordingly. I do not like to press a button every time I want to do voice recognition, and also I do not like to appear anything on the screen to talk to. Can I do that?

Any suggestions are welcome. Thank you! :)

Hoyden answered 23/7, 2014 at 11:29 Comment(0)
H
6

Android can use voice recognition without any GUI. You can use SpeechRecognizer class to do this. But google doesn't allow you to use theirs voice tools for long time recognition. After 5-7 seconds of silence it will be stopped.

If you want to use limited comands vocabulary, you can use offline continious recognition like PocketSphinx.

Hindustani answered 23/7, 2014 at 11:55 Comment(0)
O
0

For long time recognition you can use:

intent.putExtra("android.speech.extra.DICTATION_MODE", true);
Orrin answered 24/7, 2015 at 7:31 Comment(1)
Provide more details why do you think this extra switches on "long time recognition", e.g. where is it documented as having such function.Loeffler

© 2022 - 2024 — McMap. All rights reserved.