How to inhibit/ignore speech recognition while generating speech
I am using Pocketsphinx for voice recognition, it seems to work well, and sound_play for text to speech. It also works. However, when doing text-to-speech, Pocketsphinx generates nuisance words (not the words spoken because it doesn't hear them clearly, I assume). This is done in hydro using c++.
I am trying to do a voice command/response where the robot asks its human a question and the human replies. Hence, I want to inhibit speech recognition until the robot has finished its question to avoid junk messages. I don't see anyway to do this in the api.
Can anyone tell me how to do this; or if there is a workaround to avoid my problem? Basically what I'd like it some logic to tell me when sound_play is done speaking.
Thanks, Alex