Lethal Company
Install with App

Details

Latest version
1.1.1
Last Updated
First Uploaded
Downloads
102
Likes
0
Size
118KB
Dependants

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.
OpusFecPacketLossFloorPercent 15 Minimum expected packet loss (%) passed to Opus so in-band FEC stays active even when your own incoming loss is 0%.
NoiseSuppression Moderate WebRTC noise suppression (Disabled, Low, Moderate, High, VeryHigh).
VadSensitivity MediumSensitivity Voice Activity Detection aggressiveness (LowSensitivity keeps mic open easiest; VeryHighSensitivity rejects more noise).
VoiceActivationHangTimeMs 350 How long (ms) Voice Activation stays open after speech pauses (150–1000, vanilla 150).
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.
MinJitterBufferMs 80 Minimum playback jitter buffer (ms, 30–250) to absorb jitter and give Opus FEC lookahead room.
Force Rebind & Reset Voices Button Rebinds player voice objects, resets stuck playback streams, and re-syncs P2P handshakes in-game.

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 false Adds NoDelay on top of NoNagle (leave false for stability; NoDelay drops packets during Steam SDR relay handoffs).
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.

5. Diagnostics

Setting Default Description
EnableDissonanceWarnings false Surfaces Dissonance's internal warnings (late packets, desync, oversized buffers, mic stops) in LogOutput.log.
PeriodicVoiceStatsIntervalSec 0 Logs a per-player voice health snapshot every N seconds (0 = disabled, 0–60).
Dump Voice Diagnostics Now Button Immediately logs every player's voice binding, route (P2P vs HostRelay), ping, quality, packet loss, jitter, and filter state.

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"

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.