Asked
— Edited
Hello from Germany, I have 2 problems when programming scripts and hope someone can help me.
Problem 1: Speech Recognition at Low Confidence, I want that the robot at low Cinfidence says he did not hear me, for that I have written the following script, which unfortunately will cause it always says he did not understand me correctly:
: start
WaitForChange($SpeechConfidence)
$SpeechConfidence < = ( 0.69 )
sayEZBWait("Entschuldigung, ich habe Dich nicht richtig verstanden")
GoTo(start)
Problem 2: I would like to start a script when the robot speaks, this, I wrote the following script but does not work:
:start
$sayEZBWait = "eingabe"
WaitForChange SayEZBWait("text to speech")
if(SayEZBWait = ("true")
$z = 1
ElseIf (SayEZBWait = ("false")
$z = 0
EndIf
if($z = 1)
ControlCommand("Script Manager", ScriptStart, "Start Körpersprache")
ElseIf ($z = 0)
ControlCommand("Script Manager", ScriptStart, "Stop Körpersprache")
endif
Goto (start)
Thanks for your Help
*edited by DJ Sures to put code in proper UBB tags so people can read it.
I'll check my project this weekend and make sure it still works and see if I missed anything in my instructions.
Alan
Alan, Thanks for your help
Sven
I haven't had a chance to look at/ test my project yet, but thinking about it, I think you will need to define a virtual servo and define the range of motion for the variable to populate.
I should be able to confirm it tonight or first thing tomorrow.
Alan
Well, it appears that the functionality was broken sometime in one of the last few releases.
@DJ, if you are watching this thread, see my public project "myroli-mkii".
On the second virtual desktop is a sound servo (EZB) object defined as a virtual servo. The $Soundv4Value variable used to change whenever I used either the speech test script or played the song in the Soundboard (EZB) on desktop 1. If you run the Sound LED script while any sound was playing, it would brighten and darken an LED on port D11.
I tested this after you made the fix Steve references above with the misnamed sound servo objects and it worked, so sometime between then and now it has stopped working.
In fact, Sound servo (EZB) does not appear to be working at all. I redefined it from the virtual port to one of the claws, and it does not react to any EZ-B sound.
Talk servo does work correctly.
Alan
The sound with the sound servo I once abandoned. But now I have the next problem, it is not possible to give RSS Feeds on the ECB again. The SpeakRSSEZB command does not exist. Have I missed something here?
Greetings from Germany and sorry for my many questions. Sven