Simple voice controlled game

Hi,
i searched, but i don’t find an simple example, like Pong, which can be controlled via voice.
Has anyone a link, an ebook, or so where it is demonstrated (with sources)?

Thank you
jj.

I think there’s some Nintendo DS games that do something like this. For instance, there’s a Zelda game where you blow into the microphone to move a leaf or something.

But, no, I don’t know where you would find code samples for that.

Look at the Java Speech API.

I don’t know if that’s what you are looking for, but since you said “Pong” I thought in something like this :

http://www.java-gaming.org/index.php/topic,19632.0.html

If that is what you’re after I can give you a version of the sound control that is much more readable and uses less processing time. Just reply to this thread.

The pitch detection in SingSong Karaoke is much better, but I don’t know whether Nate released code for that or not. Might be worth searching for.

More readable sounds :wink:
I would appreciate this code

Thx
jj.

By “more readable” I actually meant the source code. The original was a 4k game and just designed to be as short as possible.

Here’s a nicer version of the same system. You can probably get away with just looking at Example.java. It opens a line to a mic, creates the pitch reader, and adds itself as a listener.

If you’re really into this sort of control mechanism then I’d suggest rolling your own, maybe using auto-correlation (wikipedia probably has articles on it), which would give much finer resolution.