You are viewing a potentially older version of this package. View all versions.
FFJPEG-BetterVoice-1.1.1 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.

Date uploaded 2 hours ago
Version 1.1.1
Download link FFJPEG-BetterVoice-1.1.1.zip
Downloads 45
Dependency string FFJPEG-BetterVoice-1.1.1

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.
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"

CHANGELOG

Changelog

1.1.1

  • Critical P2P moon-landing fix: Lethal Company calls GameNetworkManager.LeaveLobbyAtGameStart() -> LeaveCurrentSteamLobby() when the ship lands on a moon (currentLobby becomes null while the Netcode session stays active). Previously, BetterVoice treated leaving the Steam lobby as disconnecting and shut down P2P voice tunnels (BetterVoice closing) for the rest of the round on clients without LobbyControl.
  • P2P lifecycle and peer discovery now track both the Steam lobby and active NetworkManager / StartOfRound.allPlayerScripts (playerSteamId), keeping direct Steam SDR P2P voice alive seamlessly across moon landings and takeoffs.

1.1.0

  • Audio hole fixes:
    • Added OpusFecPacketLossFloorPercent (default 15%) so Opus actually embeds in-band FEC data even when your own incoming packet loss is 0%, seamlessly reconstructing single-packet drops for listeners.
    • Added MinJitterBufferMs (default 80ms) to prevent brief Wi-Fi/Steam SDR jitter from dropping 20ms packets and breaking FEC lookahead.
    • Added VadSensitivity and VoiceActivationHangTimeMs (default 350ms vs vanilla 150ms) to stop Voice Activation from chopping sentences or quiet speech.
  • P2P reliability fixes:
    • Changed P2PImmediateSend default to false (SendType.Unreliable | SendType.NoNagle instead of NoDelay) so Steam SDR relay handoffs don't drop voice packets.
    • Eliminated single-packet P2P ↔ Host Relay route flip-flopping on transient send errors (which caused out-of-order late packets and jitter spikes).
    • Upgraded P2P reconnection to exponential backoff (up to 5 attempts) and added a 10-second P2P Hello heartbeat so bindings self-heal if Dissonance resets or reassigns IDs mid-session.
    • Added immediate voice binding on DissonanceComms.Net_PlayerJoined and a Force Rebind & Reset Voices button in LethalConfig.
  • Diagnostics:
    • Added 5. Diagnostics section in LethalConfig: EnableDissonanceWarnings, PeriodicVoiceStatsIntervalSec, and Dump Voice Diagnostics Now (shows per-player binding, route, P2P ping/quality, packet loss, jitter, and audio filter state).

1.0.0

  • Initial release.
  • Configurable Opus voice bitrate (16–96 kbps, default 48 kbps) and frame size (default 20 ms) with live updates.
  • Configurable WebRTC noise suppression and built-in RNNoise background noise removal.
  • Configurable incoming voice low-pass cutoff (default 20,000 Hz), wall occlusion intensity, and optional indoor facility reverb toggle.
  • Fixes StartOfRound.RefreshPlayerVoicePlaybackObjects() skip bug, removes the 12-second voice binding delay, and cleans up stale player voice references on disconnect/rejoin.
  • Prevents FrameSkipDetector from resetting microphone capture on brief FPS hitches (< 2s).
  • Adds SendType.NoNagle flushing for unreliable FacepunchTransport packets.
  • Adds hybrid Steam SDR P2P voice routing (SteamNetworkingSockets on a separate virtual port) with automatic fallback to the vanilla host relay for unmodded peers.
  • Full soft-dependency LethalConfig integration.