#Multiplayer voice chat using Mirror

9 messages · Page 1 of 1 (latest)

verbal hull
#

Hi! I'm trying to enable players to chat with each other in my Mirror project. Is there any way to support multiplayer voice chat under the Mirror framework? I can't find anything related to realtime audio in the official docs. Thanks!

normal wharf
normal wharf
#

Do you want it for free? You can create a voice chat yourself by transferring bytes over the network with the Microphone class

eager mesa
last jasper
# eager mesa Have you already done it or do you have any idea how to do it this way?

That thing I recently decided to implement in my game.

What you should do:

  1. Use Microphone class to capture audio data.
  2. Use an encoding/decoding library to compress your audio data (I'm personally using Opus).
  3. Record, encode and send the encoded data over network with NetworkMesage's.
  4. Receive the encoded data, decode it back to PCM format and feed it to AudioSource.
#

What I also would do is to create a voice "room" (or "channel" or "group") system.
With it I can create a master group for all players or several groups for different teams (so a team can only hear voices of its teammates).