Capturing CS:GO Demo Voice Data

This is an example of how to use the demoinfocs-golang library to capture voice chat in CELT format.

Join us on Discord

Discord Chat

Prerequisites

You need to have the following installed:

  • Linux (macOS or WSL may work, but are not tested)
  • CS:GO Linux Binaries
  • CELT – Audio Codec Library
  • Sox – Sound Processing Tools (for playback and conversion to .wav)

Running the example

Adjust the paths in the below example before running.

STEAM_LIBRARY="..." # <--- insert path to steam library here
CSGO_BIN="$STEAM_LIBRARY/steamapps/common/Counter-Strike Global Offensive/bin/linux64"
export CGO_LDFLAGS="-L \"$CSGO_BIN\" -l:vaudio_celt_client.so"
export LD_LIBRARY_PATH="$CSGO_BIN:$LD_LIBRARY_PATH"

go run capture_voice.go -demo /path/to/demo.dem # <--- replace with your demo

This will create a file called out.celt.

With Sox installed, you can play this file via:

play -t raw -r 22050 -e signed -b 16 -c 1 out.celt

Or convert it to .wav via:

sox -t raw -r 22050 -e signed -b 16 -c 1 -L out.celt out.wav

Acknowledgements

Thanks to @ericek111 for this gist

GitHub

View Github