
Is there a variable or method to know when servos have stopped moving? I make my C3PO head talk with the ChatGPT response and using SayEZB and Talk servo 2. Sometimes BingSpeech Recognition hears the wake word again - or at least it thinks it does. So, once I am waiting for C3PO to complete his speech response from ChatGPT, can I pause bing speech recognition? I have tried to do this in the Chat GPT script, but it is not working. Here is my script:
$Response = getVar("$OpenAIResponse"); Digital.set(d0, 1, 0); Digital.set(d1, 1, 0); controlCommand("Bing Speech Recognition", "PauseListening"); Audio.sayEZB($Response); sleep(1000); controlCommand("Bing Speech Recognition", "UnpauseListening");
This does not work because it does not know when EZB is done "speaking" to "UnpauseListening". Also, I have no idea how long ChatGPT will respond- so I can't just use a sleep command. Is there a way I could sense the servos have stopped moving? Any ideas?
I think it would be good if VAD on off was set via a variable. So if I say "Robot" now I have woken the robot up and set VAD = 1 so he listens to me. Now I can have a chit chat back and forth and if I say Robot Sleep I can set VAD = 0 so he needs wake word again. I saw in the latest IOS update Siri does something similar.
Yes does that work, I guess I should have read the manual
Oh wait... haha there's already a ControlCommand for that. It's the pause listening and unpause listening. The commands only show up in the cheatsheet if VAD is enabled because they don't matter otherwise.
From the bing speech recognition manual...
Nice, so I just add the Phrase "Robot Wake" and "Robot Sleep" and the ControlCommand in the config and he will no longer listens to me, Cool.