Earshot – Proximity Voice Chat for Netcode


The frames just before you start talking are sent, so first syllables are never cut. ... Voice effects. ... Small speed changes hold the delay on target without gaps. Microphones handled.


by PrimeMode Studios


Price History +

Proximity voice chat for Netcode for GameObjects: distance, walls, radios, echo cancellation, voice effects, its own low-bandwidth codec. No voice service, no fees, no native plugins.
  • Unity 2022.3 LTS with Netcode for GameObjects 1.x, or Unity 6 with Netcode for GameObjects 2.x (both tested)
  • Any NGO transport: Unity Transport, Relay, Steam
  • Windows, macOS, Linux, Android, iOS; WebGL listen-only (no microphone API on WebGL)
  • Built-in Render Pipeline and URP; both input systems
  • Core assembly with no networking dependency: use the capture, codec and playback with your own transport
  • Codec: MDCT transform codec, 16 kHz wideband, 20 ms frames, range coded, about 0.05 ms per frame to encode or decode
  • Echo cancellation: frequency-domain adaptive filter with automatic delay finding, about 0.2 ms per 20 ms frame
  • Measured on a LAN: about 115–165 ms mouth to ear (sound card not included)
  • No third-party code, no network calls outside your own game (the demo people are CC0 MakeHuman assets, see Third-Party Notices.txt)
  • Full C# source code
  • Documentation: Earshot Manual (PDF) in Assets/Earshot/Documentation

Hear your players from where they stand.

Earshot adds proximity voice chat to your Netcode for GameObjects game. Voices come from each player's mouth on an ordinary 3D AudioSource. They fade with distance, are muffled behind walls and carry over radios at any distance. Everything runs inside your game: no voice service, no account, no per-user fee, no native plugin. One component on your player prefab and two players can talk.

What it does

  • Proximity voice. Each voice plays from the speaker's mouth. A falloff curve you draw sets the volume over distance. Unity's panning, reverb zones, mixer groups and spatializer plugins all apply.
  • Walls that muffle. Raycasts count the walls between listener and speaker. Each wall lowers the volume and closes a low-pass filter. Three rays side by side make a voice fade in smoothly as you walk round a corner or through a door.
  • Radio channels. Players tuned to the same channel hear each other flat, at any distance, with a walkie-talkie sound. Players standing nearby still hear the person talking into the radio.
  • Whisper and shout. One value per player scales how far the voice carries.
  • Spectators. Dead players hear the living and talk among themselves. The living never hear them.
  • Broadcast and your own rules. One voice heard by everyone (lobby host, announcer), or one callback on the server to decide who hears whom: teams, phones, intercoms, jammers.
  • Light on the network. The server forwards each packet only to the players who can hear it. The built-in codec uses about 23 kbit/s per talking player, from 16 to 48 kbit/s with the quality presets, and nothing while silent. Lost packets are hidden.
  • Clean microphone sound. High-pass filter, automatic gain and noise suppression (about 11–13 dB less fan and hum). Voice activity ignores steady background noise. Push-to-talk and open mic are there too. The frames just before you start talking are sent, so first syllables are never cut.
  • Echo cancellation. Players without headphones no longer send everyone's voices back: their loudspeakers are taken out of the microphone, automatically lined up, double-talk safe, in pure C# (about 28 dB less echo sent in a simulated room).
  • Voice effects. Deep, high, monster or robot voice, or any pitch, applied before sending so everyone hears the disguise. Made for social deduction games and creatures.
  • Smooth playback. An adaptive jitter buffer grows on bad connections and shrinks back. Small speed changes hold the delay on target without gaps.
  • Microphones handled. Choose a device, plug one in later, run-time permission requests on Android and iOS, listen-only fallback where there is no microphone.
  • Lip-sync. The Voice Lip Sync component opens a character's mouth with its voice, on a blend shape or a jaw bone, after the Animator.
  • Gameplay hooks. A server event reports every voice with its loudness, for creatures that hear players talk. A 0–1 loudness per voice drives talking icons and meters.

Ready-made UI, built in code (any render pipeline)

  • A voice settings panel: microphone, live input meter with a draggable activation mark, voice activity / push-to-talk / open mic, noise suppression, echo cancellation, automatic gain, volumes, and a microphone test that plays your own voice back through the codec. Choices are saved per player.
  • Talking icons over heads, pulsing with the voice.
  • A "who is talking" list with level bars, radio channel and spectator tags.
  • A live debug table: route, distance, volume, walls, buffer, lost packets and bit rate for every voice.

Test it alone

  • Speech-like test voices for bots, generated in code, so you can walk among talking players without a second PC or any recordings.
  • Loopback, to hear yourself through the codec.
  • Simulated packet loss and jitter.
  • An editor graph of volume over distance, open air and behind a wall.
  • A project check that sets the iOS microphone description and other details for you.

In the box

  • A demo at night: an open plaza with a metre grid, rooms with doorways and a sliding door, a long corridor and a radio mast far beyond hearing range. Five talking people who turn their heads to you and move their mouths with their voices, one walking round the plaza (made from CC0 MakeHuman assets, animated in code), ripples on the floor while they speak, lines from you to every voice coloured by the walls in between. Press Start to walk among them, or Join a second copy to talk with a friend.
  • A manual: quick start in three steps, every setting, scripting examples, troubleshooting.
  • Full C# source. The codec, resampler and jitter buffer are pure C#, commented in plain English.

Questions or problems: primemodestudios@gmail.com. If Earshot helps your game, a review helps us a lot.