Custom grammar for Android speech recognition
I am trying to apply the开发者_运维技巧 custom grammar for speech recognition. I have found a lot of documentation about android.speech.recognition package, it seams as the good place to start, but it seams that it doesn't exist in the Android SDK..
Is there a way to apply a custom grammar rules to the android speech recognition at all..?
No, Android's recognizer intent only supports two language models. These are the "Free Form" model and the "web search" model. It does not support custom grammars.
See http://developer.android.com/reference/android/speech/RecognizerIntent.html#EXTRA_LANGUAGE_MODEL
You may be able to use one of these libraries to do it:
Pocket Sphinx: http://cmusphinx.sourceforge.net/2011/05/building-pocketsphinx-on-android/
or http://jvoicexml.sourceforge.net/
精彩评论