Programming a computer to listen and speak
Click the green flag and say something. And then say more things.
If you are wondering how the computer does this then read this.
It would be better if your program can speak as well as listen.
Try changing the text in the speak block. Click the green flag to hear the result.
There are lots of ways of speaking the same thing.
Try putting a number less than 10 after the word 'pitch'.
Try putting a number less than 2 after 'rate'.
Try putting a number less than 20 after 'voice'.
Try fractions too!
Let's speak back when we hear something.
Put together the four blocks to respond when it hears something.
If you get stuck or want to see how to do this go to the next page.
If you got stuck, here's a program that repeats what it hears.
Let's start giving commands to the turtle.
Put together the five blocks to respond to 'turn right' by turning.
Use if else instead of if so your program responds when it doesn't understand what was said.
Click on 'save project' to save your work.
OK now add 'Turn left', 'Go forward', and 'Go back'.
Click on 'open project' to restore what you did earlier.
You can save lots of work by right clicking and duplicating and then editing your script.