FFJPEG-BetterVoice icon

BetterVoice

Improves Lethal Company voice chat quality, fixes delayed/missing player voice binding and hitch mic resets, and adds direct Steam SDR P2P voice between modded peers.

Last updated an hour ago
Total downloads 31
Total rating 0 
Categories Audio Client-side Server-side Bug Fixes Performance Tweaks & Quality Of Life
Dependency string FFJPEG-BetterVoice-1.0.1
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100

README

BetterVoice

BetterVoice

Vanilla friendly mod that fixes Lethal Company's low voice quality, random voice dropouts/lag, delayed player binding, and mic cutoffs during FPS hitches - while remaining compatible with vanilla lobbies and upgrading to direct Steam P2P voice whenever peers also have the mod.

LethalConfig supported (optional): All settings can be tweaked live in-game if LethalConfig is installed, or via BepInEx/config/BetterVoice.cfg.


Works even if only you have the mod (Vanilla-compatible)

  • Higher Bitrate (48 kbps default vs vanilla 17 kbps): Raises your outgoing voice clarity significantly and updates live without restarting. Vanilla clients decode higher Opus bitrates cleanly.
  • Lower Latency Frame Size: Reduces capture/encode framing delay.
  • Optional RNNoise & Noise Suppression Controls: Exposes Dissonance's WebRTC noise suppression level and built-in RNNoise neural background removal (fans, keyboards).
  • Cleaner Incoming Audio Filters: Raises the vanilla 10,000 Hz low-pass ceiling on nearby unoccluded players (default 20,000 Hz), lets you soften wall muffling, and lets you toggle off indoor facility reverb.
  • Fixes Unheard / Buggy Rejoin Players:
    • Fixes a vanilla if / else if bug in StartOfRound.RefreshPlayerVoicePlaybackObjects() that skipped linking newly found voice states on the same pass.
    • Eliminates long wait before binding newly connected/rejoined players.
    • Clears stale PlayerControllerB voice references on disconnect so reusing a player slot doesn't break audio.
  • Stops Mic Cutoffs on FPS Hitches: Prevents Dissonance's FrameSkipDetector from tearing down and restarting microphone capture during brief level-load or FPS spikes (< 2s).
  • Immediate Packet Flushing (NoNagle): Stops FacepunchTransport from Nagle-buffering unreliable voice/Netcode packets.

What unlocks automatically when you and other players have the mod?

  • Direct Steam SDR P2P Voice:
    • Vanilla routes all voice through the host (Speaker → Steam Relay → Host → Steam Relay → Listener), making every listener depend on the host's upload and frame loop.
    • When multiple players in the same Steam lobby have BetterVoice, it opens a dedicated SteamNetworkingSockets tunnel using Valve's existing Steam Datagram Relay (virtualport 77 by default) and sends voice directly peer-to-peer (Speaker → Steam SDR → Listener).
    • Mixed-lobby safe: Even in a vanilla-hosted lobby, any two modded players talk directly via P2P while unmodded players automatically fall back to the vanilla Netcode relay.

Configuration

All settings are available in LethalConfig (most apply immediately without restarting):

1. Audio Quality

Setting Default Description
OpusBitrateKbps 48 Outgoing Opus bitrate in kbps (16–96). Vanilla Medium is 17.
FrameSize Small_20ms Opus frame size (Tiny_10ms, Small_20ms, Medium_40ms_Vanilla, Large_60ms). Applies on lobby join/host.
ForwardErrorCorrection true Enables Opus in-band FEC to recover lost packets.
NoiseSuppression Moderate WebRTC noise suppression (Disabled, Low, Moderate, High, VeryHigh).
BackgroundNoiseRemovalRNNoise false Enables Dissonance's built-in RNNoise neural background removal.
BackgroundNoiseRemovalStrength 0.65 RNNoise wet mix (0.0–1.0).

2. Filters & Immersion

Setting Default Description
ClearVoiceHighCutoffHz 20000 Low-pass cutoff (Hz) when players aren't behind walls (10000–22000). Vanilla is 10000.
WallOcclusionIntensity 0.75 How strongly walls/obstacles muffle voices (0.0 = none, 1.0 = vanilla).
DisableFacilityVoiceReverb false Disables the indoor AudioReverbFilter on player voices.

3. Stability & Binding Fixes

Setting Default Description
FixVoiceBindingAndRejoin true Fixes the 12s delay, RefreshPlayerVoicePlaybackObjects skip bug, and disconnect cleanup.
PreventHitchMicReset true Stops FrameSkipDetector from resetting mic capture on FPS hitches < 2s.
DisableTransportNagle true Flushes FacepunchTransport unreliable packets with SendType.NoNagle.

4. Steam P2P Voice

Setting Default Description
EnableSteamP2PVoice true Direct Steam SDR P2P voice between modded peers with automatic vanilla fallback.
P2PVirtualPort 77 SteamNetworkingSockets virtual port (1–255). Modded peers must match.
P2PImmediateSend true Sends P2P voice packets with NoNagle | NoDelay for minimal latency.
LogP2PEvents false Logs P2P connections and bindings to the BepInEx console for debugging.
Reconnect P2P Peers Button Refreshes direct P2P tunnels for the current Steam lobby.

Building from Source

dotnet build BetterVoice.csproj -c Release
# Override game path if Lethal Company is installed elsewhere:
dotnet build BetterVoice.csproj -c Release -p:LethalCompanyDir="C:\Program Files (x86)\Steam\steamapps\common\Lethal Company"