Voice Control for SDL Game?

Hi,

I am working on that integrates the SDL-based
’Lgeneral’ (http://lgames.sourceforge.net/index.php?project=LGeneral)
with Carnegie Mellon University’s
’Sphinx-2’ (http://cmusphinx.sourceforge.net/sphinx2/) speech
recognition software.

In short, a player ought to be able to say, “unit at 'thirty four, five’
move to ‘thirty four, six’” and see this happen. Another example might
be for a player to say, “stats sixteen four” and have the computer
display the unit’s current statistics at hex 16,4.

This, I believe, isn’t too far fetched. Here’s an article regarding how
far practical speech recognition has come these days:

http://www.newsforge.com/article.pl?sid=05/01/13/1445211

As a short excercise, here’s the output of the sphinx2 demo Perl script
demonstrating real-time voice processing:

$ /usr/bin/sphinx2-demo
[initializing]
[silence] [audio] FORWARD FORTY METERS
[silence] [audio] FORWARD FORTY METERS
[silence] [audio] BACKWARD SIXTY THREE METERS
[silence] [audio] ROTATE RIGHT TWELVE DEGREES
[silence] [audio] TURN LEFT FORTY THREE DEGREES
[silence] [audio] FORWARD THREE HUNDRED AND SIXTY EIGHT METERS
[silence] [audio] QUIT
[exit]

I said these things naturally into the microphone for this output. It is
because of Sphinx-2’s high accuracy without training that I believe this
can work.

My question is, how does one go about parsing the voice commands
Lgeneral? Do I create custom SDL_UserEvents that read an incoming stream
from Sphinx-2? If you have any ideas on how to approach this I am
greatful for your input.

-Coop

Hi,

the library really works this good out of the box?
awesome.

bye,
Flo

D. Cooper Stevenson schrieb:> Hi,

I am working on that integrates the SDL-based ‘Lgeneral’
(http://lgames.sourceforge.net/index.php?project=LGeneral) with Carnegie
Mellon University’s ‘Sphinx-2’
(http://cmusphinx.sourceforge.net/sphinx2/)
http://cmusphinx.sourceforge.net/sphinx2/). speech
http://cmusphinx.sourceforge.net/sphinx2/). recognition software.
http://cmusphinx.sourceforge.net/sphinx2/).

In short, a player ought to be able to say, “unit at 'thirty four, five’
move to ‘thirty four, six’” and see this happen. Another example might
be for a player to say, “stats sixteen four” and have the computer
display the unit’s current statistics at hex 16,4.

This, I believe, isn’t too far fetched. Here’s an article regarding how
far practical speech recognition has come these days:

http://www.newsforge.com/article.pl?sid=05/01/13/1445211

As a short excercise, here’s the output of the sphinx2 demo Perl script
demonstrating real-time voice processing:

$ /usr/bin/sphinx2-demo
[initializing]
[silence] [audio] FORWARD FORTY METERS
[silence] [audio] FORWARD FORTY METERS
[silence] [audio] BACKWARD SIXTY THREE METERS
[silence] [audio] ROTATE RIGHT TWELVE DEGREES
[silence] [audio] TURN LEFT FORTY THREE DEGREES
[silence] [audio] FORWARD THREE HUNDRED AND SIXTY EIGHT METERS
[silence] [audio] QUIT
[exit]

I said these things naturally into the microphone for this output. It is
because of Sphinx-2’s high accuracy without training that I believe this
can work.

My question is, how does one go about parsing the voice commands
Lgeneral? Do I create custom SDL_UserEvents that read an incoming stream
from Sphinx-2? If you have any ideas on how to approach this I am
greatful for your input.

-Coop



SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Sadly, I apt-get installed “sphinx2-demo” on Debian/sarge, and made sure
my mic was plugged in and working (I played “Mr. Microphone” a little, to
annoy my wife in the other room-oom-oom ;^) ), but sadly it never seemed to
do anything besides say: “[intitalizing]”

I would be interested in seeing how this could get integrated with SDL,
though!On Tue, May 10, 2005 at 05:28:58PM +0200, Florian Hufsky wrote:

Hi,

the library really works this good out of the box?
awesome.


-bill!
bill at newbreedsoftware.com
http://newbreedsoftware.com/

Bill,> On Tue, 2005-05-10 at 15:39 -0700, Bill Kendrick wrote:

Sadly, I apt-get installed “sphinx2-demo” on Debian/sarge, and made sure
my mic was plugged in and working (I played “Mr. Microphone” a little, to
annoy my wife in the other room-oom-oom ;^) ), but sadly it never seemed to
do anything besides say: “[intitalizing]”

I think it’s the “sphinx2-bin” package.

Here’s a link to the list of installed files:

http://packages.debian.org/cgi-bin/search_contents.pl?searchmode=filelist&word=sphinx2-bin&version=unstable&arch=i386

Here’s the package page:

http://packages.debian.org/unstable/sound/sphinx2-bin.html

I’m glad that you’re enthusiastic about linking voice commands to SDL;
it could potentially be ported to all kinds of SDL based applications!

-Coop

I’ve always thought that this sort of idea would be kind of cool with an
email proggie.

eg. you get home from work, and when you get in the door, you’re able to say
"check email" which downloads all your emails. Perhaps it could also read
back the subject headings and sender of any emails found. Open 1 would open
the first email that was read out. The email would then be read back to you.
Kind of hard to manage seeing as if you put microphones everywhere so that
you don’t have to be near the computer, you’d get some major feedback just
from having the volume set high enough on the settings to get the results
read out. Clipping on a wireless mic would be counter productive to the ease
of the system.On 5/11/05, D. Cooper Stevenson wrote:

Bill,

On Tue, 2005-05-10 at 15:39 -0700, Bill Kendrick wrote:

Sadly, I apt-get installed “sphinx2-demo” on Debian/sarge, and made sure
my mic was plugged in and working (I played “Mr. Microphone” a little, to
annoy my wife in the other room-oom-oom ;^) ), but sadly it never seemed to
do anything besides say: “[intitalizing]”

I think it’s the “sphinx2-bin” package.

Here’s a link to the list of installed files:

http://packages.debian.org/cgi-bin/search_contents.pl?searchmode=filelist&word=sphinx2-bin&version=unstable&arch=i386

Here’s the package page:

http://packages.debian.org/unstable/sound/sphinx2-bin.html

I’m glad that you’re enthusiastic about linking voice commands to SDL; it
could potentially be ported to all kinds of SDL based applications!

-Coop


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I am working on that integrates the SDL-based
’Lgeneral’ (http://lgames.sourceforge.net/index.php?project=LGeneral)
with Carnegie Mellon University’s
’Sphinx-2’ (http://cmusphinx.sourceforge.net/sphinx2/) speech
recognition software.

Very cool.

What you might do is translate the voice commands into SDL_USEREVENT events,
or some other command queue that is interpreted by the game whenever normal
command input is processed.

See ya!
-Sam Lantinga, Software Engineer, Blizzard Entertainment