Closed michelinok closed 3 years ago
Possibly because IsRecording is not set immediately when StartRecording is called. What are you trying to do inside the loop? If you are not doing anything inside the loop, is there some reason you are unable to use the OnStopped event?
I'm quite a newbie...I'm trying to play a file (this works, it plays mp3 of random words) then listen and check if the recognized text is ok. It's a sort of play-listen-check if equal. It would be great if i could do this inside a loop (changing the mp3 and the corresponding text to check).
The recognized text is passed in the OnText event. Use the OnStopped event to know when recording has stopped.
One more question...if no text is recognized, which event is fired?
OnStopped is fired regardless of whether or not any text is recognized, so if you want to know whether no text was recognized, one way would be to have a flag you set before calling StartRecording, then change that flag in OnText. When OnStopped is called, you will know whether or not any text has been recognized by the state of that flag
Since i've not found a way to ask for help, i'll try here (it's not a bug nor a feature request).
In my code I would like to wait for "FSpeech.StartRecording" to finish
I've tryed this:
FSpeech.StartRecording; while FSpeech.IsRecording do begin end;
But it doesn't wait...Any suggestion?
Many thanks!