Microsoft Speech Recognition Speed

2020-06-17 05:39发布

I am working on a small practice app using Microsoft's speech recognizer. I cannot seem to get it to recognize single words fast enough for what I am doing. I would like to be able to speak normally and the system will grab "keywords" from what I am saying and produce a string. Currently I am using a custom grammar of 5 words. Red, Blue, Yellow, Green, Orange. For example if I say Red blue yellow. The engine will grab "Red" and the rest goes into the void.

I have tried using the following:

sr.RecognizeAsync(RecognizeMode.Single)

Then reset it back to single mode after the AudioState changes to "stopped." This is not fast enough to catch the next word. Thoughts?

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2020-06-17 06:05

Have you tried PauseRecognizerOnRecognition. I looks like this function will buffer your audio input while it is processing the previous audio.

From above MSDN link:

When PauseRecognizerOnRecognition is true, during the execution of the SpeechRecognized handler the speech recognition service pauses and buffers new audio input as it arrives. Once the SpeechRecognized event handler exits, the speech recognition service resumes recognition and starts processing information from its input buffer.

查看更多
登录 后发表回答