Simple Speech Recognition Grammar

I have a program with GrammarBuilders and Grammer that is used in SpeechRecognitionEngine for speech recognition. Can I, rather than recognize audio, use the same grammar to recognize a typed command (in a string)? Something like commandGrammar.parse (commandString)?

+6
source share
1 answer

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.

+3
source

Source: https://habr.com/ru/post/909509/


All Articles