Microsoft Speech Recognition Speed
Asked Answered
M

1

7

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?

Mime answered 14/8, 2011 at 19:6 Comment(0)
L
6

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.

Laraelaraine answered 14/8, 2011 at 20:17 Comment(4)
In conjunction with RecognizerAudioPosition I was able to get the results I was looking for. Thank you very much!Mime
Could you show how you got this to work? I'm having the same trouble.Scare
@PhloxMidas I just pointed him in the right direction he figured out the rest by himself but unfortunately he has not be on SO since he asked the question. The function I pointed him to will buffer the input and judging by his comment he was using RecognizerAudioPosition to set the position in the buffer he was reading from.Laraelaraine
My problem is that PauseRecognizerOnRecognition is only on SpeechRecognizer and not SpeechRecognitionEngine, which I'm using. Furthermore, there's no way to set RecognizerAudioPosition so I can't figure out how he used this. I'll work on it and post an answer if I find one.Scare

© 2022 - 2024 — McMap. All rights reserved.