Search code examples
androidspeech-recognitionspeech-to-textgoogle-speech-api

Is it possible to customize Android google speech recognition?


I have few questions to ask related to Google Speech recognition in Android. I have developed an Android application using Google Speech Recognition online service. Now, to further improve it, I need to know answers for the below questions.

  1. Can I add a "custom dictionary" either in offline recognition or online recognition?

  2. Can I command it to do Grammar based recognition, keyword recognition and keyphrase recognition? Right now it seems like there is no options for such, instead of common recognition.

  3. Can I change the "listen timeout" ? It seems like how much I change, it simply do not work.


Solution

  • This is the correct answer, because I have tried and done it.

    Can I add a "custom dictionary" either in offline recognition or online recognition?

    Not possible

    Can I command it to do Grammar based recognition, keyword recognition and keyphrase recognition? Right now it seems like there is no options for such, instead of common recognition

    Can't command it to do grammer based recognition but can detect keywords and keyphrase, you have to write custom code with if-else condition do do that. To do this you actually need detect and convert word by word instead of waiting for the entire sentence is completed by the user and android voice recognition service automatically get closed to give you the result. This is possible and it is known as "mid speech interim"

    For keyword recognition see this video

    Can I change the "listen timeout" ? It seems like how much I change, it simply do not work.

    No, but you can code it in a tricky way to do continuous recognition. Aboce youtube video does continuous recognition as well. For an application which does the same refer to this link.