If Then Else routine not working without WIFI on

I put together a voice controlled Robot App that works great when my tablet WIFI is turned on, but when WIFI is off, the 'Then' part of my IF-THEN-ELSE routine is skipped over and only the 'Else' part runs. The voice App accepts a voice recognition word, prints it to a screen label, determines if it is a 'STOP' command and if so, sends a modified result over Bluetooth. If it's not a 'STOP' command it parses the word result and also sends it over Bluetooth. (I've only shown the main trouble blocks below)

When WIFI is turned off the 'STOP' command is simply passed on to the 'ELSE' function and treated like other non STOP commands.
What am I missing? Bug or missing element?

I see you are writing the result from speech recognizer to label 2. Remove the "upcase" blocks to see exactly what you get. What result do you see in the label? Perhaps without the Internet, Speech recognizer returns "Stop" instead of "stop". "Stop" is different from "stop", so the else function is executed.

Thanks very much! For some reason when WIFI is on the recognizer returns lower case 'stop' and when WIFI is is off the recognizer returns 'Stop'. Not quite sure why this happens but problem solved!

Could this be a difference in behaviors between Google's online speech recognition service and a lesser powered local speech recognition capability?

1 Like

I believe that must be the case. Hopefully I don't encounter any more surprises like this.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.