@akiver/csgo-voice-extractor 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 AkiVer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,161 @@
1
+ # CSGO voice extractor
2
+
3
+ CLI to export players' voices from CSGO demos into WAV files.
4
+
5
+ **Valve Matchmaking demos do not contain voice audio data, hence there is nothing to extract from MM demos.**
6
+
7
+ ## Installation
8
+
9
+ ### Windows
10
+
11
+ 1. Download the last release from [GitHub](https://github.com/akiver/csgo-voice-extractor/releases)
12
+ 2. Copy/paste the following files from the `CSGO` installation folder next to the executable:
13
+
14
+ - `tier0.dll`
15
+ - `vaudio_celt.dll`
16
+
17
+ > **Note**
18
+ > By default, these files are located in `C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\bin`
19
+
20
+ ### macOS
21
+
22
+ 1. Download the last release from [GitHub](https://github.com/akiver/csgo-voice-extractor/releases)
23
+ 2. Copy/paste the following files from the `CSGO` installation folder next to the executable:
24
+
25
+ - `libtier0.dylib`
26
+ - `libvstdlib.dylib`
27
+ - `vaudio_celt.dylib`
28
+
29
+ > **Note**
30
+ > By default, these files are located in `~/Applications/Steam/steamapps/common/Counter-Strike Global Offensive/bin/osx64`
31
+
32
+ ### Linux
33
+
34
+ 1. Download the last release from [GitHub](https://github.com/akiver/csgo-voice-extractor/releases)
35
+ 2. Copy/paste the following files from the `CSGO` installation folder next to the executable:
36
+
37
+ - `libtier0_client.so`
38
+ - `vaudio_celt_client.so`
39
+
40
+ > **Note**
41
+ > By default, these files are located in `~/.steam/steam/steamapps/common/Counter-Strike Global Offensive/bin`
42
+
43
+ ## Usage
44
+
45
+ ### Windows
46
+
47
+ ```bash
48
+ csgove.exe demoPaths... [-output]
49
+ ```
50
+
51
+ By default `.dll` files are expected to be in the same directory as the executable.
52
+ You can change it by setting the `LD_LIBRARY_PATH` environment variable, example:
53
+
54
+ ```bash
55
+ LD_LIBRARY_PATH="C:\Users\username\Desktop" csgove.exe
56
+ ```
57
+
58
+ ### macOS
59
+
60
+ > **Warning**
61
+ > The environment variable `DYLD_LIBRARY_PATH` must be set before invoking the program and point to the location of the `.dylib` files!
62
+
63
+ ```bash
64
+ DYLD_LIBRARY_PATH=. csgove demoPaths... [-output]
65
+ ```
66
+
67
+ ### Linux
68
+
69
+ > **Warning**
70
+ > The environment variable `LD_LIBRARY_PATH` must be set before invoking the program and point to the location of the `.so` files!
71
+
72
+ ```bash
73
+ LD_LIBRARY_PATH=. csgove demoPaths... [-output]
74
+ ```
75
+
76
+ ### Options
77
+
78
+ `-output <string>`
79
+
80
+ Folder location where audio files will be written. Current working directory by default.
81
+
82
+ `-exit-on-first-error`
83
+
84
+ Stop the program at the first error encountered. By default, the program will continue to the next demo to process if an error occurs.
85
+
86
+ ### Examples
87
+
88
+ Extract voices from the demo `myDemo.dem` in the current directory:
89
+
90
+ ```bash
91
+ csgove myDemo.dem
92
+ ```
93
+
94
+ Extract voices from multiple demos using absolute or relative paths:
95
+
96
+ ```bash
97
+ csgove myDemo1.dem ../myDemo2.dem "C:\Users\username\Desktop\myDemo3.dem"
98
+ ```
99
+
100
+ Change the output location:
101
+
102
+ ```bash
103
+ csgove -output "C:\Users\username\Desktop\output" myDemo.dem
104
+ ```
105
+
106
+ ## Developing
107
+
108
+ ### Requirements
109
+
110
+ - [Go](https://go.dev/)
111
+ - [GCC](https://gcc.gnu.org/)
112
+
113
+ _Debugging is easier on macOS/Linux **64-bit**, see warnings below._
114
+
115
+ ### Windows
116
+
117
+ _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._
118
+
119
+ 1. 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`.
120
+ If you use [MSYS2](https://www.msys2.org/), it's important to install the 32-bit version (`pacman -S mingw-w64-i686-gcc`).
121
+ 2. Copy/paste `tier0.dll` and `vaudio_celt.dll` from the CSGO installation folder in the project's root folder.
122
+ 3. `CGO_ENABLED=1 GOARCH=386 go run .`
123
+
124
+ > **Warning**
125
+ > 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.
126
+ > 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.
127
+
128
+ ### macOS
129
+
130
+ 1. Copy/paste `libtier0.dylib`, `libvstdlib.dylib` and `vaudio_celt.dylib` from the CSGO installation folder in the project's root folder.
131
+ 2. `DYLD_LIBRARY_PATH=. CGO_ENABLED=1 GOARCH=amd64 go run .`
132
+
133
+ > **Warning**
134
+ > On macOS ARM64, the Go debugger breakpoints will not work because the executable must target amd64 but your OS is ARM64.
135
+
136
+ ### Linux
137
+
138
+ 1. Copy/paste `libtier0_client.so` and `vaudio_celt_client.so` from the CSGO installation folder in the project's root folder.
139
+ 2. `LD_LIBRARY_PATH=. CGO_ENABLED=1 GOARCH=amd64 go run .`
140
+
141
+ ## Building
142
+
143
+ ### Windows
144
+
145
+ `make build-windows`
146
+
147
+ ### macOS
148
+
149
+ `make build-darwin`
150
+
151
+ ### Linux
152
+
153
+ `make build-linux`
154
+
155
+ ## Credits
156
+
157
+ Thanks to [@saul](https://github.com/saul) and [@ericek111](https://github.com/ericek111) for their [investigation](https://github.com/saul/demofile/issues/83#issuecomment-1207437098).
158
+
159
+ ## License
160
+
161
+ [MIT](https://github.com/akiver/csgo-voice-extractor/blob/main/LICENSE)
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@akiver/csgo-voice-extractor",
3
+ "version": "1.0.0",
4
+ "description": "CLI to export players' voices from CSGO demos into WAV files.",
5
+ "author": "AkiVer",
6
+ "license": "MIT",
7
+ "bugs": {
8
+ "url": "https://github.com/akiver/csgo-voice-extractor/issues"
9
+ },
10
+ "homepage": "https://github.com/akiver/csgo-voice-extractor#readme",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/akiver/csgo-voice-extractor.git"
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "os": [
19
+ "darwin",
20
+ "linux",
21
+ "win32"
22
+ ],
23
+ "cpu": [
24
+ "x64",
25
+ "arm64"
26
+ ],
27
+ "keywords": [
28
+ "Counter-Strike",
29
+ "CS",
30
+ "CSGO",
31
+ "audio"
32
+ ]
33
+ }