kf-voice
kf-voice is a drop-in, battle-tested voice wrapper for FiveM built in Mumble, a seamless replacement for pma-voice, mumble-voip, and TokoVOIP. Features
vMenu: If your server is using vMenu, you have to turn off vMenu chat.
Features
Section titled “Features”- Plug-and-Play Upgrade: Swap in for pma-voice, mumble-voip, or TokoVOIP.
- Rich Proximity Controls: Whisper / normal / shout with customizable keybinds.
- Native 3D & Submix Audio: Leverage GTA’s spatial audio, reverb, and mix routing so radios, calls, and contexts sound distinct and immersive.
- Voice Channels: Allows external scripts to change voice channels
- Voice Contexts: Configurable audio sandboxes where scripts can group players, control who hears/speaks, override isolation on demand.
- Clean In-Game UI: Real-time radio, call, and proximity state.
- Secure External Hosting: Optional external Mumble address/port with endpoint hiding to keep infrastructure private without sacrificing performance.
Commands
Section titled “Commands”/vol- Sets radio or call volume./muteply- Mutes specified player.
Credits
Section titled “Credits”- @AvarianKnight for pma-voice (uses same api/config)
- @Frazzle for mumble-voip (for which the concept came from)
- @pichotm for pVoice (where the grid concept came from)
Getting Started
Section titled “Getting Started”-
Download the latest from Cfx.re Portal
Section titled “Download the latest from Cfx.re Portal” -
Install
Section titled “Install”Move the
kf-voicefolder into your server’sresourcesdirectory. -
Add to
Section titled “Add to server.cfg”server.cfgAdd the following to your
server.cfg.server.cfg setr voice_useNativeAudio truesetr voice_useSendingRangeOnly trueensure kf-voice
Configuration (ConVars)
Section titled “Configuration (ConVars)”The resource reads config exclusively via convars and exposed in the fxmanifest convar_category. Common ones:
voice_useNativeAudio,voice_use2dAudio,voice_use3dAudio,voice_useSendingRangeOnlyvoice_enableUi,voice_enableProximityCycle,voice_defaultCyclevoice_defaultRadioVolume,voice_defaultCallVolume,voice_defaultContextVolume,voice_defaultVoiceModevoice_enableRadios,voice_enableCalls,voice_enableSubmix,voice_enableRadioAnimvoice_defaultRadio,voice_uiRefreshRatevoice_debugMode,voice_hideEndpoints
Defaults are calculated at runtime so changes only require server restarts (players may need to reconnect for some defaults like volumes).
Exports
Section titled “Exports”Server
Section titled “Server”setPlayerRadio(source, channel)– assign/remove radio membership.setPlayerCall(source, channel)– join/leave phone calls.addChannelCheck(channel, cb)– gate radio channel joins.overrideRadioNameGetter(cb)– custom display names in radio lists.- Voice Contexts:
createContext(id, metadata?)destroyContext(id)setContextMetadata(id, metadata?)addContextPlayer(id, source, options?)–options.role('participant'default,'monitor'),options.canTalk?,options.isolateIncoming?,options.isolateOutgoing?,options.uiLabel?.setContextPlayerState(id, source, state)– allows updating isolation, talkback,uiLabel; role changes are rejected.removeContextPlayer(id, source)clearPlayerContexts(source)getContextSnapshot(id)– returns{ id, metadata, participants, monitors, contributors }.getPlayerContexts(source)– per-context role data with isolation flags.
Client
Section titled “Client”setRadioChannel(channel),removePlayerFromRadio(),setCallChannel(channel)setRadioVolume(vol),setCallVolume(vol),setContextVolume(vol)toggleMutePlayer(serverId)registerCustomSubmix(cb)/setEffectSubmix(type, id)getRadioVolume(),getCallVolume(),getContextVolume()setVoiceProperty(property, value)– toggles radio enablement, mic clicks.- Proximity helpers:
overrideProximityCheck(cb),resetProximityCheck(),setListenerOverride(bool),setVoiceState(state, channel).
State Bags
Section titled “State Bags”Key state properties stored per player via Player(source).state or LocalPlayer.state:
radio– current radio volume (1–100)call– current call volumecontext– current context routing volumeradioChannel,callChannel– active channel numbers (0 = none)assignedChannel– reserved Mumble channel id assigned at joinproximity– table{ index, distance, mode }for UI and scriptsvoiceIntent–'speech'or'music'disableRadio– bitmask for radio restrictionsradioActive– boolean state for UIpmaVoiceInit– guard to lazily initialize defaultssubmix– current submix name applied to the player (if any)disableProximity– disable proximity scans for this player
Voice Context Workflow (Summary)
Section titled “Voice Context Workflow (Summary)”- Server resource creates a context (e.g.,
createContext('pd:interrogation', { label = 'Interrogation Room' })). - When gameplay logic determines a player should join, call
addContextPlayerwith the desired role ('participant'or'monitor') and isolation/talkback options. - Client receives
kf-voice:context:update, stores metadata inVoiceClientState, and recomputes voice targets. Isolation setsLocalPlayer.state.disableProximity = trueso normal proximity updates skip them, while monitors and participants remain mutually audible (monitors withcanTalkalso feed contributors). - When players leave,
removeContextPlayerorclearPlayerContextsensures both routing and state bags revert, restoring default proximity/radio behaviour.