How can I add voice chat to my game?

Started by
3 comments, last by BHXSpecter 15 years, 5 months ago
I have googled left and right, and while I have found several SDKs for adding voice chat (all wanting no less than $100 flat out, which I can't afford) to a application (game or other). I want to add voice chat to my games so that the players can talk, rant, or taunt the opponent/team mates. Sadly, I haven't found anything that meats my requirements or a tutorial, article, or code that shows how to do this. Requirements for SDK/API/etc: MUST BE cross-platform for Windows and Linux at minimum MUST BE C++ MUST work with MinGW Any help someone could give me in this topic and area would be greatly appreciated. --Clayton Weaver
Advertisement
Did you notice http://www.speex.org/ already?

It is what I am planning to use for the exact purpose you mention.

The best thing about it is that it is free and patent-free.

If I remember correctly then the RakNet http://www.jenkinssoftware.com/ networking library has integrated Speex.
I would also take into account that many serious gamers already have an external voice chat solution, so they wont care if you have it or not - in particular a lot of MMO guilds require them.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

For some games the external solutions might be acceptable, but if you want something more complicated than just speaking to other players, it's not feasible.

For example imagine having soldiers of a team talking to each other when they are close to each other in the game world. They could see each others' lips moving in the game. Then they could hear the sound only if they are close-enough. The voice would be loud or not depending on the distance to the player who is speaking.

The objects in the game world could affect how far the voice travels. A player inside a building is not so audible to you if you are outside that building or in another room of the same building, but you would hear that player well if you were also in the same room.

And there can be radio channels in the game, and you would only hear the voices of players who are on the same radio channels. A radio channel could be: vehicle channel, team channel, global channel and so on. I think this gets very tricky to handle if you don't have an in-game solution.

Examples of a voice chat which goes far beyond what the external solutions can provide can be found from games Operation Flashpoint and Armed Assault. Go to http://www.bistudio.com/ to learn more about these games.

Sure, people use external solutions for voice chat with those games, but they lose all the great voice chat features the games provide.
That is why I don't want to make my players use another application to talk to each other. Games take a lot of memory and CPU so I want to make the talk feature in-game rather than running a second application to tax the computer even more. I have had the recommendation of using OpenAL Soft with a compression format of ARM or such to send it.

This topic is closed to new replies.

Advertisement