{"id":21247394,"url":"https://github.com/akiver/csgo-voice-extractor","last_synced_at":"2026-04-11T01:01:34.361Z","repository":{"id":69055822,"uuid":"564897878","full_name":"akiver/csgo-voice-extractor","owner":"akiver","description":"CLI to export players' voices from CSGO/CS2 demos into WAV files.","archived":false,"fork":false,"pushed_at":"2024-09-11T17:15:56.000Z","size":711,"stargazers_count":17,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-23T02:33:51.491Z","etag":null,"topics":["cs-demo","cs2","csgo"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akiver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-11T19:06:25.000Z","updated_at":"2024-10-21T08:59:01.000Z","dependencies_parsed_at":"2024-02-21T01:40:42.157Z","dependency_job_id":"d38c2bc4-084e-4868-a9df-b674c57cb323","html_url":"https://github.com/akiver/csgo-voice-extractor","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"802d3185b6330692fbb7b2224910c2b5d429816e"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akiver%2Fcsgo-voice-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akiver%2Fcsgo-voice-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akiver%2Fcsgo-voice-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akiver%2Fcsgo-voice-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akiver","download_url":"https://codeload.github.com/akiver/csgo-voice-extractor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224838318,"owners_count":17378265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cs-demo","cs2","csgo"],"created_at":"2024-11-21T02:19:52.804Z","updated_at":"2026-04-11T01:01:34.326Z","avatar_url":"https://github.com/akiver.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Counter-Strike voice extractor\n\nCLI to export players' voices from CSGO/CS2 demos into WAV files.\n\n\u003e [!WARNING]  \n\u003e **Valve Matchmaking demos do not contain voice audio data, hence there is nothing to extract from MM demos.**\n\n## Installation\n\nDownload the latest release for your OS from [GitHub](https://github.com/akiver/csgo-voice-extractor/releases/latest).\n\n## Usage\n\n### Mode\n\nThe program can export voices in 3 different modes:\n\n1. **Split compact**: extracts and concatenates all of each player's voice segments into separate WAV files. Each player will have their own WAV file containing only their voice data (without silence), and the files will be named after the player's Steam ID. This is the default mode.\n2. **Split full**: extracts players' voices into separate WAV files that have the same duration as the demo file. Each player will have their own WAV file with voice segments placed at their original timestamps, and the files will be named after the player's Steam ID.\n3. **Single full**: extracts and merges all players' voices into a single WAV file that has the same duration as the demo file, preserving the original timing of all voice communications.\n\nTo change the mode, you have to set the `-mode` argument. The possible values are:\n\n- `split-compact` (default)\n- `split-full`\n- `single-full`\n\n### Windows\n\n```bash\ncsgove.exe demoPaths... [-output]\n```\n\nBy default `.dll` files are expected to be in the same directory as the executable.\nYou can change it by setting the `LD_LIBRARY_PATH` environment variable. Example:\n\n```bash\nLD_LIBRARY_PATH=\"C:\\Users\\username\\Desktop\" csgove.exe\n```\n\n### macOS\n\n\u003e [!CAUTION]  \n\u003e The environment variable `DYLD_LIBRARY_PATH` must be set before invoking the program and point to the location of the `.dylib` files!\n\n```bash\nDYLD_LIBRARY_PATH=. csgove demoPaths... [-output]\n```\n\n### Linux\n\n\u003e [!CAUTION]  \n\u003e The environment variable `LD_LIBRARY_PATH` must be set before invoking the program and point to the location of the `.so` files!\n\n```bash\nLD_LIBRARY_PATH=. csgove demoPaths... [-output]\n```\n\n### Options\n\n`-output \u003cstring\u003e`\n\nFolder location where audio files will be written. Current working directory by default.\n\n`-mode \u003cstring\u003e`\n\nOutput mode that determines how the voices are extracted and saved:\n\n- `split-compact` (default): separate files per player, without silence\n- `split-full`: separate files per player, with demo-length silence\n- `single-full`: single merged file with all players' voices\n\n`-steam-ids \u003cstring\u003e`\n\nComma-separated list of Steam IDs 64 to extract voices for. If not provided, voices for all players will be extracted.\n\n`-exit-on-first-error`\n\nStop the program at the first error encountered. By default, the program will continue to the next demo to process if an error occurs.\n\n### Examples\n\nExtract voices from the demo `myDemo.dem` in the current directory:\n\n```bash\ncsgove myDemo.dem\n```\n\nExtract voices from multiple demos using absolute or relative paths:\n\n```bash\ncsgove myDemo1.dem ../myDemo2.dem \"C:\\Users\\username\\Desktop\\myDemo3.dem\"\n```\n\nChange the output location:\n\n```bash\ncsgove -output \"C:\\Users\\username\\Desktop\\output\" myDemo.dem\n```\n\nExtract all voices into a single merged file:\n\n```bash\ncsgove -mode single-full myDemo.dem\n```\n\nExtract only voices of specific players:\n\n```bash\ncsgove -steam-ids 76561198123456789,76561198123456780 myDemo.dem\n```\n\n## Developing\n\n### Requirements\n\n- [Go](https://go.dev/)\n- [GCC](https://gcc.gnu.org/)\n- [Chocolatey](https://chocolatey.org/) (Windows only)\n\n_Debugging is easier on macOS/Linux **64-bit**, see warnings below._\n\n### Windows\n\n_Because the CSGO audio library is a 32-bit DLL, you need a 32-bit `GCC` and set the Go env variable `GOARCH=386` to build the program._\n\n\u003e [!IMPORTANT]  \n\u003e Use a unix like shell such as [Git Bash](https://git-scm.com/), it will not work with `cmd.exe`!\n\n\u003e [!WARNING]  \n\u003e The `$GCC_PATH` variable in the following steps is the path where `gcc.exe` is located.  \n\u003e By default, it's `C:\\TDM-GCC-64\\bin` when using [TDM-GCC](https://jmeubank.github.io/tdm-gcc/) (highly recommended).\n\n1. Install `GCC` for Windows, [TDM-GCC](https://jmeubank.github.io/tdm-gcc/) is recommended because it handles both 32-bit and 64-bit when running `go build`.\n   If you use [MSYS2](https://www.msys2.org/), it's important to install the 32-bit version (`pacman -S mingw-w64-i686-gcc`).\n2. Install `pkg-config` using [chocolatey](https://chocolatey.org/) by running `choco install pkgconfiglite`.  \n   It's **highly recommended** to use `choco` otherwise you would have to build `pkg-config` and copy/paste the `pkg-config.exe` binary in your `$GCC_PATH`.\n3. Download the source code of [Opus](https://opus-codec.org/downloads/)\n4. Extract the archive, rename the folder to `opus` and place it in the project's root folder\n5. `mkdir build \u0026\u0026 cd build`\n6. `cmake -G \"Visual Studio 17 2022\" -A Win32 -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS=ON ..`\n7. Build the `Release` configuration for `Win32` (**not `x64`** - it's important to build the 32-bit version!)\n8. Copy/paste the `opus.dll` file in `$GCC_PATH` and `dist/bin/win32-x64`\n9. Copy/paste the C header files located inside the `include` folder file in `$GCC_PATH\\include\\opus` (create the folders if needed)\n10. Copy/paste the `opus.pc.example` to `opus.pc` file and edit the `prefix` variable to match your `GCC` installation path **if necessary**.\n11. `PKG_CONFIG_PATH=$(realpath .) LD_LIBRARY_PATH=dist/bin/win32-x64 CGO_ENABLED=1 GOARCH=386 go run -tags nolibopusfile .`\n\n\u003e [!WARNING]  \n\u003e Because the Go debugger doesn't support Windows 32-bit and the CSGO lib is a 32-bit DLL, you will not be able to run the Go debugger.  \n\u003e If you want to be able to run the debugger for the **Go part only**, you could comment on lines that involve `C/CGO` calls.\n\n### macOS\n\n\u003e [!IMPORTANT]  \n\u003e On macOS `ARM64`, the `x64` version of Homebrew must be installed!  \n\u003e You can install it by adding `arch -x86_64` before the official command to install Homebrew (`arch -x86_64 /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"`)\n\n1. Install [Homebrew](https://brew.sh) **x64 version**\n2. `arch -x86_64 /usr/local/bin/brew install opus`\n3. `arch -x86_64 /usr/local/bin/brew install pkg-config`\n4. `cp /usr/local/Cellar/opus/1.6/lib/libopus.0.dylib dist/bin/darwin-x64` (`arch -x86_64 brew info opus` to get the path)\n5. `DYLD_LIBRARY_PATH=dist/bin/darwin-x64 CGO_ENABLED=1 GOARCH=amd64 go run -tags nolibopusfile .`\n\n\u003e [!WARNING]  \n\u003e On macOS ARM64, the Go debugger breakpoints will not work because the executable must target amd64 but your OS is ARM64.\n\n### Linux\n\n1. `sudo apt install pkg-config libopus-dev`\n2. `cp /usr/lib/x86_64-linux-gnu/libopus.so.0 dist/bin/linux-x64` (you may need to change the path depending on your distro)\n3. `LD_LIBRARY_PATH=dist/bin/linux-x64 CGO_ENABLED=1 GOARCH=amd64 go run -tags nolibopusfile .`\n\n## Building\n\n### Windows\n\n`make build-windows`\n\n### macOS\n\n`make build-darwin`\n\n### Linux\n\n`make build-linux`\n\n## Credits\n\nThanks to [@saul](https://github.com/saul) and [@ericek111](https://github.com/ericek111) for their [CSGO investigation](https://github.com/saul/demofile/issues/83#issuecomment-1207437098).  \nThanks to [@DandrewsDev](https://github.com/DandrewsDev) for his work on [CS2 voice data extraction](https://github.com/DandrewsDev/CS2VoiceData).\n\n## License\n\n[MIT](https://github.com/akiver/csgo-voice-extractor/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakiver%2Fcsgo-voice-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakiver%2Fcsgo-voice-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakiver%2Fcsgo-voice-extractor/lists"}