0

I have app which have running offline voice recognition service listening for one keyword. If keyword is spoken is triggered google speech recognition service which displays image like this and return text of spoken sentence.

enter image description here

I would like to know two things:

  1. How to make app processing Google speech to text if app is not in foreground or screen is locked?

  2. How to avoid "Speak Now" Dialog? (I would like to use some custom UI component)

Thanks for any advice.

redrom
  • 11,502
  • 31
  • 157
  • 264

1 Answers1

0

If you want to run speech recognition in the background I would strongly advice you to stay way from google speech. You can currently run speech recognition in the background but it will cause a speech activation sound to be triggered every 3-5 seconds. See the question below:

Android Speech Recognition as a service on Android 4.1 & 4.2

Currently this sound runs on the music channel for some reason and therefore if you try to mute it music will be muted as well.

If you want to implement this the "nice" way I would suggest you take a look at cmusphinx.

Community
  • 1
  • 1
Florian Schaal
  • 2,586
  • 3
  • 39
  • 59