Play the Animal Game - With Your Voice!

I modified the animal game example project to respond to your voice. Unfortunately, if you take too long to respond, it seems to stop listening. Thus, if Alonzo fails to respond to your answer, click him, and he will start listening again.

PS: I’ve already got it trained on a bunch of animals!

PPS: Take a look at my modified, more sophisticated, a/an reporter: animal game voice script pic


Interesting approach in A/AN. Are there a lot of animals whose names start with “houri”? :~) I’d be really impressed if you ran initial-h words through TTS and analyzed the resulting sound to see if the “h” is silent!

PS Thanks so much for sharing this huge collection of terrific projects! :~D

I took a bit of a shortcut with detecting whether you answered yes or no. Basically, I wanted any of the positive and negative words to work, so I used a translation block I found on the forums which used the scratch translation tool with the URL block, and translated between a couple languages through trial and error to only have 2 possible outcomes. This also meant that you could play in other languages! Now it seems that the Scratch translate URL must’ve changed or something, and it broke some time since the last time I played. I’ve updated the project so that it now uses a list of yes/no equivalents and checks against those. If you run across a yes or no equivalent which it doesn’t know, you can train it on that too!

Hmm, okay, now it runs, but when I thought “beetle” it went through
reptile ➞ no
can fly ➞ no
bird ➞ no
“I win!”

Huh, how does it construe that as a win?

That sounds like it heard yes every time you said no. I’ve found the issue and fixed it now!

PS: Beetles can fly.

Really? I learn something every day.

If it heard every no as a yes, why did it even ask “bird”? Are birds reptiles?

Yes, according to most scientific consensus, which holds that they descended from dinosaurs.

Oh, okay, I guess I’m not informed enough to play Animal. :~(

Yeah, the situation wasn’t ideal, but the first animal I picked was a reptile, and after that I had no choice but to answer that question with “yes” for bird (after a quick google to double check).

You can still make your own!

PS: I also had to consider things like “I chose bird. So I trained it that ‘bird’ is a valid final answer. Now what happens when someone chooses ‘parrot’? Alonzo will ask if it is a bird, they will reply yes, and Alonzo will erroneously say ‘I win!’”

Alonzo is asking if it is a bird, not the bird. Erroneous you claim?

this just happened to me!