Skip to content

saiko-tech/csgo-demo-voice-capture-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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)

Note About Valve Matchmaking

Valve Matchmaking demos do not record voice audio data, and as such this can't be extracted from MM demos.

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 different files in an out/ directory. Each file is a separate sequence of voice audio.

With Sox installed, you can play these files back via the following command (replace 1 with the sequence to play back):

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

Or convert it to .wav via:

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

Acknowledgements

Thanks to @ericek111 for this gist

About

How to capture voice audio from CS:GO demo files / replays

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages