Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple Grammar for Speech Recognition

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)?

like image 483
Christian Stewart Avatar asked Feb 28 '12 02:02

Christian Stewart


1 Answers

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.

like image 142
Kevin Junghans Avatar answered Sep 28 '22 09:09

Kevin Junghans