loading
 
Speak within an if Statement
John Wood from United Kingdom  [64 posts]
1 year
Hi,
I seem to have a problem with an If statement. When I place Speak within the If statement , no speech is heard when true. Also the Speak is in red, not sure what is causing this problem.
Simple test .robo attached
program.robo
Steven Gentner from United States  [260 posts] 1 year
John,

That is basically correct but I would make one change to the If statement and switch it to Contains as apposed to being equal. Then monitor the Listen module to see if it actually catches the text you spoke. Its rare when a single word works so sometimes saying "In the Ocean Depth" would give the recognizer more context and do a better job in recognition ... but that's why the equal if the If statement would not work.

The Speak module will remain red until run ... but that will be very quick and then go back to being red so its unlikely you will see that change.

STeven.

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