kamaroman68
USA
Asked
— Edited
My project is doing some very weird things with the speech recognition. If I post my project this evening would anyone mind taking a peek at it?
Thanks. Chris
Ya, post it. Members here seem to always be interested in helping. Make sure to let us know what's going on that you need looked at.
When I give a speech command my first line is always ControlCommand() pause speech. Do action. Sleep 10000, un pause speech recognition. In the middle the speech recognition is being un paused... even if I manually check the box to pause speech recognition it sometimes unpauses somehow and then hears something random, bird chirp ex...and it starts doing an unrelated action. I purposely made a shutdown one command to shut the robot down. For some reason that’s what it thinks it hears when a bird chirps. ( bird chirp is just a random example).
Have you done the Windows voice recognition training? You may want to retrain it to your voice even if you have. It sounds to me like the voice model may be bad.
B2K_4_29_2018.EZB
Alan I would normally agree with you.... however even when manually checking the speech recognition pause box something in pauses it. It should only unpause with "robot pay attention command" and approximately 10 seconds after every command. Take a look and tell me what you think. And yes there are some components that are not being used ie bing speech and all of the "cognitive" services. Thanks guys Chris
It's your enable phrase and disable phrase in speech rec control that is causing the problem... i leave mine blank so the robot doesn't hear itself... because sometimes it enables speech rec while it's talking for whatever reason...
Hey Richard thanks for the reply.... it did not fix it. I guess what I don't understand is if I pause speech recognition it should be paused. Nothing should take it out of pause unless I physically in-pause it.
@kamaroman68,
Speech Recognition Control
When the control is loaded, the control initializes the speech recognition, and the speech grammar is loaded with the existent: enable phrase, disable phrase, phrase list. The pause speech checkbox is irrelevant. The speech recognition is started and will fire a PhraseRecognized event when the SR catches a phrase.
Phrase Recognized event
When you load a Speech Grammar (i.e. Phrases) you are telling the engine what you expect. Every sound, noise or phrases are matched with existent Grammar, and a confidence level is reached. If the SR has something will fire the event with a phrase and a confidence level. There are many false positives, one example "Robot bla bla" is matched with "Robot Stop" and a confidence 0.51.
How is the Phrase Recognized event handled ?
Note 1: Pause checkbox state is irrelevant. Note 2: If you are monitoring the Phrase variable you should check the confidence level, otherwise a low level confidence will trigger an action.
Only one condition will be met (A or B or C or D):
A) Event.Confidence < Configuration.Confidence
B) Event.Phrase == Enable Phrase
Note: Does not matter if the Checkbox is already checked or not
C) Event.Phrase == Disable Phrase
Note: Does not matter if the Checkbox is already checked or not
D) Pause Checkbox is not checked i.e. it's not paused.
@kamaroman68
I agree with Richard R if you have an Enable and/or Disable Phrase will be matched to all Speech Recognition events. Note: Remember there are a lot of false positives.
Pause Commands and Checkbox have the same behavior.
When a Say command is executed, the speech recognition engine (not the checkbox) is paused and is resumed when the speech synthesizer ends.
SayEZB does not pause the recognition engine, so in your case, the SayEZB can interfere with the Enable/Disable phrase. Note: The Pause checkbox state is irrelevant
@kamaroman68
Please fix the following script errors:
And... test scripts in the editor before assuming they work there is the ability to Run a script in the edit window to verify that it actually works.
@ptp You are efficient and thorough... I should have went farther into the project before chiming in... Nice find(s)... Also as @DJ mentioned it's a good idea to test your scripts for errors within the editor...
Thanks for looking guys!