I have a program with GrammarBuilders and Grammer that is used in a SpeechRecognitionEngine to recognize speech. Can I, rather than recognizing from audio, use the same grammar to recognize a typed command (in a string)? Something like commandGrammar.parse(commandString)?
You should be able to use SpeechRecognitionEngine.EmulateRecognize which takes a text input in place of audio for speech recognitions.
I am not sure of the intended use, but if this will be used for something like a chat bot that automatically interacts with text input via IM or SMS I think you will find grammars very cumbersome to maintain and restrictive. I would recommend something like Artificial Intelligence Markup Language (AIML) for handling text responses. It is easy to learn and very powerful. Instead of using concise grammars which ASR's require, this language allows you to use wildcards which are much more conducive to text input. There are even some C# open source projects that provide libraries to work with AIML and simplify creation of chat bots.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With