loading
 
Speak Module repeats itself...
Loren John Presley from United States  [17 posts]
15 year
Hello everyone.

I've got my robot to obey voice commands, like "come," "reverse," "stop" etcera...

Now I want my robot to say something cool like, "coming master," each time I say "come."

Problem: the voice repeats itself again and again while the robot is moving forward. Is there just a way to make the robot say "coming master," only once while the robot is moving forward?

Any help much appreciated.

Loren
Anonymous 15 year
Loren,

Download 2.0.9.4 which will clear that variable after use. The issue is that each time the speak module runs the variable is still set. With the new version that variable is cleared to prevent this.

STeven.
Mano from Netherlands  [27 posts] 13 year
I have downloaded the latest version but mine still keeps repeating itself.
What can i do?
Anonymous 13 year
Mano,

How are you setting the text to speak? Be sure you are not setting that variable each time throught the pipeline. Or just post your robofile here and we'll have a look.

STeven.
Mano from Netherlands  [27 posts] 13 year
I used this code. Second post.

http://www.roborealm.com/forum/index.php?thread_id=3881#2u>
Anonymous 13 year
Yea, that one doesn't check for repetition ... try this

TotalObj = GetVariable("NV_OBJECTS_TOTAL")
ObjIdx = GetArrayVariable("NV_ARR_OBJ_IDX")

ReDim ObjName(20)
ObjName(0) = "1"
ObjName(1) = "2"
ObjName(2) = "3"
ObjName(3) = "4"
ObjName(4) = "5"

SpeakStr = "I see"

for i = 0 to TotalObj-1 step 1
SpeakStr = SpeakStr + " " + ObjName(ObjIdx(i))
next

if TotalObj = 0 then SpeakStr = ""

if GetStrVariable("LAST_STR") <> SpeakStr then
  SetVariable "SPEAK_STR", SpeakStr
  SetStrVariable "LAST_STR", SpeakStr
end if

which will also silence the robot when it doesn't see anything.

STeven.
Anonymous 13 year
That indeed did the trick! Thank you.

There was a little bug though:

SetStrVariable "LAST_STR", SpeakStr

should be

SetVariable "LAST_STR", SpeakStr

But i figured that out very quick.
Anonymous 13 year
Why is it taking so long for the plugin to update?
When i take the object out of view, the plugin keeps thinking it's there for about 20 seconds.
Could it be because of a low framerate? I have about 4 frames per second.
EDV  [328 posts] 13 year
It is depend on depth of object tracking (about 40 frames in recognition mode) and when object has disappeared the tracking was waiting 40 frames in previous position.

Solution: Just switch Navigator plugin to "Navigate mode", and then depth of object tracking will be two frames.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index