Left 4 Dead 2

Left 4 Dead 2

46 ratings
Fixing low volume of incoming voice
By mota
This guide describes how to improve volume of incoming voice so you can hear your teammates with microphone loud and clear.
   
Award
Favorite
Favorited
Unfavorite
The Motivation
If you are using in-game voice chat you want to hear your teammates and to be heard yourself. This guide is about the first. Usually if you hear someone talking in L4D2 the incoming voice appears to be very quiet and we blame the person for buying awful microphone.

The truth is the problem is in L4D2 game itself and can be easily fixed on your computer. By following this guide you can fix everyone's microphone.
The Problem
During the game there are basically two sources of audio (inputs) - the game sound and voices. Because you have only one audio output device (speakers, headphones) those two inputs need to merge in one audio stream which is called mixing.

Before you can understand the problem, you need to understand what audio volume is. Every audio track has finite number of volume steps. The number of steps is important for quality and depends on the audio bit depth. The most common is 16 bit audio, which has 65536 steps (2 ^ 16). This may not sound like much, but audio tracks don't need all the space. As a consequence an audio track may be stored with different volume (read average volume) without sacrificing quality.

So just because your microphone is capturing your voice with low volume it does not mean it is of low quality. Turning up the volume on your headphones will reveal loud and clear voice. But it is not this easy because L4D2 is mixing the quiet voice with loud game sounds. Average microphone will record you at about -40 db, however game sounds are stored normalized, which basically means as loud as possible - the average volume is about -10 db to -5 db.
The Fix
Now we know the problem is simple volume mismatch between incoming voice and game sounds. The are 3 fixes I know of; let's iterate the first two fixes real quick. The third fix is what I think is the best solution.

A) The voice_scale command
You can open the dev console during gameplay and use this command to make incoming voice bit louder. The good is this is quick and simple solution. The bad is small tuning is not enough to make the incoming voice loud and clear and big tuning introduce severe distortion.

The default value is 0.7. So to reset this feature you would type voice_scale 0.7. To make some the voice bit louder you would typically input voice_scale 1.5 - this make work well up to 3.0. But from my experience anything higher is pure noise.

B) The snd_gain command
I believe (I didn't really try it) this command should attentuate game sounds, and keeping the voice volume intact. Thats exactly what we need, however you can use this command on server with cheats enabled. I just skip this, but feel free to experiment.

C) Attentuating game sounds
There is about 26 000 sounds in L4D2 stored in wav files. Those are stored usually in 16 bit depth and 44100 Hz sampling rate, but you can also find 22050 Hz and 11025 Hz files. About 100 sounds of the 26 000 are stored in 8 bit depth.

All the files are normalized, i.e. stored with the maximum posibble volume. But as I describe in next session we can easily make them all bit quieter without sacrificing quality.
Attentuating game sounds
DISCLAIMER: I TAKE NO RESPONSIBILITY FOR YOUR ACTIONS. IF YOU BURN YOUR HOUSE OR CAUSE HARM TO YOURSELF OR OTHERS BECAUSE OF THIS GUIDE IT IS ENTIRELY YOUR FAULT.



You gonna need simple batch script that will recursively iterate over all sound files in your L4D2 installation folder and program called SoX which will do the heavy work - changing volume of the sounds. The second step is to rebuild L4D2 sound cache.

1. The batch script
Copy the code below and save it using notepad as text file and call it attentuate.bat. There are two things you need to edit - you need to point L4D2_HOME variable to the directory where you installed your L4D2 and you need to download the SoX tool and point SOX_HOME the the directory where you unpacked it. You can download SoX here.[sourceforge.net]

You will have to run it from command line and it requires one action parameter. There are two actions - apply and undo.

attentuate.bat apply
The above will attentuate all sounds by 20 db.

attentuate.bat undo
This will roll back all changes the script made.

When you run the script, it will count all the files it will alter (about 26000) and ask you for permission to continue. The processing may take 20 minutes or so. You can play during that time, which may give you some laughter as some sounds will become quiet and some not. The script will stop when something went wrong and you can always run undo action to get back original sounds. The progress is outputted so you can see it is not stalled.

Quick note on undo function - you really get the original file because the script makes copy of the sounds it alters.

@echo off setlocal enabledelayedexpansion :::::::::::::::::::::: :: VARIABLES :::::::::::::::::::::: set L4D2_HOME=D:\steam\steamapps\common\Left 4 Dead 2 set SOX_HOME=C:\Users\Admin\Desktop\sox-14.4.2-win32\sox-14.4.2 set PATH=%PATH%;%SOX_HOME% set TO_PROCESS=0 set PROCESSED=0 :::::::::::::::::::::: :: DETECT ARGUMENTS :::::::::::::::::::::: if "%~1" == "apply" ( goto apply ) if "%~1" == "undo" ( goto undo ) goto end :::::::::::::::::::::: :: APPLY -20 db TO L4D2 SOUNDS :::::::::::::::::::::: :apply for /R "%L4D2_HOME%" %%s in (*.wav) do ( set /A TO_PROCESS=!TO_PROCESS! + 1 ) echo Number of *.wav files to be processed: %TO_PROCESS%. pause for /R "%L4D2_HOME%" %%s in (*.wav) do ( echo # %%s echo. copy /-Y "%%s" "%%s.original" || pause sox "%%s.original" "%%s" vol -20 db || pause set /A PROCESSED=!PROCESSED! + 1 echo !PROCESSED! of %TO_PROCESS% ) echo Finished processing %PROCESSED% of %TO_PROCESS% *.wav files. goto end :::::::::::::::::::::: :: UNDO ALL CHANGES :::::::::::::::::::::: :undo for /R "%L4D2_HOME%" %%s in (*.wav.original) do ( set /A TO_PROCESS=!TO_PROCESS! + 1 ) echo Number of *.wav.original files to be undone: %TO_PROCESS%. pause for /R "%L4D2_HOME%" %%s in (*.wav.original) do ( echo # %%s echo. move /Y "%%s" "%%~dpns" || pause set /A PROCESSED=!PROCESSED! + 1 echo !PROCESSED! of %TO_PROCESS% ) echo Finished undoing %PROCESSED% of %TO_PROCESS% *.wav.original files. goto end :::::::::::::::::::::: :: EXIT THIS SCRIPT :::::::::::::::::::::: :end pause exit /B 0

2. Rebuilding sound cache
First 125 ms of every sound is cached in a file thats is loaded in memory while you play. So when some sound needs to be played, the first moments of it are played from RAM and the rest of the sound is obtained from much slower hard disk during the 125 ms.

Because we have changed the files on disk, we have to rebuild the cache, otherwise you will hear popping and cracking during gameplay which is extremely annoying.

So once the script finishes run the game and open dev console. Run those two commands below. The game may seem unresponsive during building the cache.

snd_updateaudiocache
This will update the audio cache for sounds which file size has changed. This make take 20 min.

snd_rebuildaudiocache
This will update the audio cache for sounds which file size didn't change. This will take few minutes if you run snd_updateaudiocache before.

One of the commands may be redundant, but the snd_rebuildaudiocache is really quick if you run snd_updateaudiocache before so don't skip it.
Final note
This is the ultimate fix for voice chat in L4D2. I blame Valve for not mixing game sounds and voice properly. All we needed is separate volume control for game sounds only, but the master volume control affects both the game sounds and voice. Design flaw.

Nice thing about this guide is you fix everyone's microphone but your own. You will hear other players loud and clear - and I mean it - after I applied this fix I can see that 99% of you has high quality mics with detailed voice texture and low noise (except Russians). Just joking.

However most of the players will never hear or think about this and they won't hear your voice as clear as you do. You can fix that too, but that would be for another guide - I will consider writing it if this one gains some acceptance.
14 Comments
nonô 4 Feb @ 5:32pm 
voice_scale command worked here! thank you sm :LeonRE4:
Dharles 24 Jul, 2024 @ 12:06pm 
Where is the backup stored? I took like 6GBs out of my storage lol
I want to delete it
srpska garda 24 Dec, 2022 @ 2:56pm 
I understood the joke about the Russians ( I am myself russian people)
Trink 1 May, 2022 @ 12:11pm 
how can I apply the SoX fix to l4d1?
azizaalll 31 Jan, 2022 @ 9:16am 
yukjkkkiij0oj090i9i9ij




ty
Chaos 24 Jun, 2018 @ 8:47am 
Aka, the one mentioned in the final note shown here. However most of the players will never hear or think about this and they won't hear your voice as clear as you do. You can fix that too, but that would be for another guide - I will consider writing it if this one gains some acceptance.
Chaos 24 Jun, 2018 @ 8:47am 
Hey, please make the one to fix your mic being too quiet on your end
Pangia 5 Aug, 2017 @ 5:01am 
Or even simpler – boost microphone gain in your sound device settings and you're good to go.
耂劲 3 Aug, 2017 @ 8:04pm 
haha
Hamudi 2 Aug, 2017 @ 12:21pm 
"DISCLAIMER: I TAKE NO RESPONSIBILITY FOR YOUR ACTIONS. IF YOU BURN YOUR HOUSE OR CAUSE HARM TO YOURSELF OR OTHERS BECAUSE OF THIS GUIDE IT IS ENTIRELY YOUR FAULT." how do u even burn ur house with volume?