Skip to main content

Technical overview

The plugin uses Unreal's replicated APlayerState as the identity for each player's voice.

UOnsetVoipWorldSubsystem is created for each game or PIE world. It manages UOnsetVoipTalker instances and automatically creates or destroys one for each APlayerState.

UOnsetVoipTalker handles the voice state for one (remote) player. It receives voice packets, runs them through the playout and jitter-buffer pipeline, updates talking state, and dispatches decoded audio for playback. On clients and listen servers, 2D and 3D audio components are created or reused only when that playback type is needed. It can also create a UOnsetNameplateComponent for remote pawns when nameplate settings allow it.

UOnsetVoipLocalPlayerSubsystem is created for each local player. It manages microphone capture, voice processing, Opus encoding, channel hints, loopback, recording, and sending local voice packets. It is not used on dedicated servers.

UOnsetVoipDataChannel is a custom network channel for FOnsetVoipPacket transmission. A client uses it to send local packets to the server. The server has one channel per connected client and forwards packets only to relevant connections. On a listen server, received remote packets can also be checked for local host playback.

FOnsetVoipPacket contains the compressed Opus voice buffer, sample position, amplitude, optional owner APlayerState, optional voice channel hints, and network serialization.

UOnsetVoipAudioComponent owns a UOnsetVoipSoundWave, binds to decoded talker audio, and applies the configured attenuation and source effect chain assets.

Relevancy routing​

The server stamps a relevancy value on each voice packet per receiving connection. On the receiving side, the talker dispatches the decoded audio once, and each bound audio component only plays audio whose relevancy contains its accepted flag. The flags are a bitmask, so a packet can be routed to several playback types at once.

Relevancy flagMeaningPlays through
2DShared voice channel (team chat, radio channel)The talker's 2D audio component, created on demand
3DProximity voice within MaxReplicationDistanceThe talker's 3D audio component on the pawn, created on demand
SpeakerA bound speaker actor is net relevant to the listenerEvery UOnsetVoipSpeakerComponent bound to the talker
NoneNot audible for this listener. Never forwarded to clients, occurs only during server-side processingNothing, but talking state and audio events still update

Talking state (OnVoipTalkingStateChange) and the audio data events update whenever a packet is processed, regardless of the relevancy value. Servers process every packet, so server-side talking state works for all talkers on both dedicated and listen servers, and recorders bound to the audio data events capture every talker on both server types, including talkers the listen-server host cannot hear.