What it is
Voice chat built entirely on SpacetimeDB, with no media server. Clients encode audio as Opus in the browser and send small packets through a reducer. The module routes them through an event table, and row-level security makes sure each packet only reaches the people who should hear it.
It supports regular rooms and proximity rooms, where only players within range of the speaker hear them. Positions come from your own movement code, so clients can't teleport to eavesdrop, and the client fades and pans each voice in 3D. Server mute and join/leave handling are included.
Where it fits
- Multiplayer games and virtual spaces that want voice without running a separate media or WebRTC server: party and lobby chat, proximity chat in a shared world, or small group calls in a collaborative app.
- Everything stays in one backend, so who can hear whom follows your own game state and permissions.
How it works
Mount it, add one row-level-security rule with voip.packetFilterSql('voip'), and connect the lifecycle hooks with voip.onConnect / voip.onDisconnect. Create rooms in init with voip.newRoom(...) (with { spatial: true, range: 30 } for proximity), and call voip.setPosition(...) from your movement reducer.
Clients join a room, send packets with the voip.send reducer, and play what arrives on voip.packet. The repo includes a browser demo client. Rust and C# versions share the same schema.

