Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any cross platform libraries available for handling input from a microphone?

I am thinking beyond voice chat to noise / voice recognition.

I am putting together a plan for a role playing game and in thinking of features I was thinking it would be nice if the player could be standing in a crowded place and yell and have the npc's react to that and look at the player for example.

As I plan to make this an open source project I want to make it as cross platform friendly as possible.

share|improve this question
Depends, do you want it to actually respond to commands? Or just gauge yelling? – Noctrine Aug 17 '10 at 23:32
ideally respond to commands would be good, but I don't know if voice recognition is advanced enough yet to make that a viable option. If it only could understand you some of the time it would just make it frustrating. – Tim Aug 18 '10 at 5:04
Yeah, voice recognition is very difficult., And like Coderanger said below all of the open libraries are quite a bit behind. – Noctrine Aug 18 '10 at 13:29
up vote 1 down vote accepted

Check out Carnegie Mellon's Project Sphinx it's an open source toolkit for speech recognition. I haven't used it, but it's certainly a place to start.

share|improve this answer
Basically all the open-source speech recognition systems are lightyears behind the commercial world unfortunately. The tech is all there, but they haven't had the same amount of time tweaking the pattern engines and they don't have access to the same size and quality of training data (that stuff is $$$$$). – coderanger Aug 18 '10 at 5:59
For a game you don't need to rely on full-NLP. As long as you keep the available command list short and distinct even basic solutions can work. Here is Sphinx being used in a RTS-like demo example: – wkerslake Aug 18 '10 at 6:49

PortAudio should have a cross-platform input API, but I've never tried using it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.