Randomizing Answers in Speech Recognition

How it Works

This system works by taking a phrase from a text file. If I say:


You look nice today
The computer, using the FileReadRandom() command, opens the complements.txt text file and reads a random line from that file. That file is full of complements, one on each line. Because the script sets a variable as what the computer read, you then use either the "Sayezb()" or "say()" commands to read that variable, which in turn responds to your statement with a complement.

The same process occurs if you greet the robot, but uses a different text file and a different variable.


Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.