You should be able to use SpeechRecognitionEngine.EmulateRecognize , which takes text input instead of audio for speech recognition.
I'm not sure about the intended use, but if it will be used for something like a bot chat that automatically interacts with text input via IM or SMS, I think you will find the grammar very cumbersome to maintain and restrict. I would recommend something like Artificial Intelligence Markup Language (AIML) for processing textual responses. It is easy to learn and very powerful. Instead of using compressed grammars that require ASR, this language allows the use of wildcards, which are much more favorable for text input. There are even some open source C # projects that provide libraries with AIML and simplify the creation of chats.
source share