@akiver/csgo-voice-extractor 2.1.3 → 3.1.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/README.md CHANGED
@@ -7,10 +7,24 @@ CLI to export players' voices from CSGO/CS2 demos into WAV files.
7
7
 
8
8
  ## Installation
9
9
 
10
- Download the last release for your OS from [GitHub](https://github.com/akiver/csgo-voice-extractor/releases/latest).
10
+ Download the latest release for your OS from [GitHub](https://github.com/akiver/csgo-voice-extractor/releases/latest).
11
11
 
12
12
  ## Usage
13
13
 
14
+ ### Mode
15
+
16
+ The program can export voices in 3 different modes:
17
+
18
+ 1. **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.
19
+ 2. **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.
20
+ 3. **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.
21
+
22
+ To change the mode, you have to set the `-mode` argument. The possible values are:
23
+
24
+ - `split-compact` (default)
25
+ - `split-full`
26
+ - `single-full`
27
+
14
28
  ### Windows
15
29
 
16
30
  ```bash
@@ -48,6 +62,18 @@ LD_LIBRARY_PATH=. csgove demoPaths... [-output]
48
62
 
49
63
  Folder location where audio files will be written. Current working directory by default.
50
64
 
65
+ `-mode <string>`
66
+
67
+ Output mode that determines how the voices are extracted and saved:
68
+
69
+ - `split-compact` (default): separate files per player, without silence
70
+ - `split-full`: separate files per player, with demo-length silence
71
+ - `single-full`: single merged file with all players' voices
72
+
73
+ `-steam-ids <string>`
74
+
75
+ Comma-separated list of Steam IDs 64 to extract voices for. If not provided, voices for all players will be extracted.
76
+
51
77
  `-exit-on-first-error`
52
78
 
53
79
  Stop the program at the first error encountered. By default, the program will continue to the next demo to process if an error occurs.
@@ -72,6 +98,18 @@ Change the output location:
72
98
  csgove -output "C:\Users\username\Desktop\output" myDemo.dem
73
99
  ```
74
100
 
101
+ Extract all voices into a single merged file:
102
+
103
+ ```bash
104
+ csgove -mode single-full myDemo.dem
105
+ ```
106
+
107
+ Extract only voices of specific players:
108
+
109
+ ```bash
110
+ csgove -steam-ids 76561198123456789,76561198123456780 myDemo.dem
111
+ ```
112
+
75
113
  ## Developing
76
114
 
77
115
  ### Requirements
@@ -99,12 +137,13 @@ _Because the CSGO audio library is a 32-bit DLL, you need a 32-bit `GCC` and set
99
137
  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`.
100
138
  3. Download the source code of [Opus](https://opus-codec.org/downloads/)
101
139
  4. Extract the archive, rename the folder to `opus` and place it in the project's root folder
102
- 5. Open the `opus/win32/VS2015/opus.sln` file with Visual Studio (upgrade the project if asked)
103
- 6. Build the `Release` configuration for `Win32` (**not `x64`** - it's important to build the 32-bit version!)
104
- 7. Copy/paste the `opus.dll` file in `$GCC_PATH` and `dist/bin/win32-x64`
105
- 8. Copy/paste the C header files located inside the `include` folder file in `$GCC_PATH\include\opus` (create the folders if needed)
106
- 9. Copy/paste the `opus.pc.example` to `opus.pc` file and edit the `prefix` variable to match your `GCC` installation path **if necessary**.
107
- 10. `PKG_CONFIG_PATH=$(realpath .) LD_LIBRARY_PATH=dist/bin/win32-x64 CGO_ENABLED=1 GOARCH=386 go run -tags nolibopusfile .`
140
+ 5. `mkdir build && cd build`
141
+ 6. `cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS=ON ..`
142
+ 7. Build the `Release` configuration for `Win32` (**not `x64`** - it's important to build the 32-bit version!)
143
+ 8. Copy/paste the `opus.dll` file in `$GCC_PATH` and `dist/bin/win32-x64`
144
+ 9. Copy/paste the C header files located inside the `include` folder file in `$GCC_PATH\include\opus` (create the folders if needed)
145
+ 10. Copy/paste the `opus.pc.example` to `opus.pc` file and edit the `prefix` variable to match your `GCC` installation path **if necessary**.
146
+ 11. `PKG_CONFIG_PATH=$(realpath .) LD_LIBRARY_PATH=dist/bin/win32-x64 CGO_ENABLED=1 GOARCH=386 go run -tags nolibopusfile .`
108
147
 
109
148
  > [!WARNING]
110
149
  > 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.
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akiver/csgo-voice-extractor",
3
- "version": "2.1.3",
3
+ "version": "3.1.0",
4
4
  "description": "CLI to export players' voices from CSGO/CS2 demos into WAV files.",
5
5
  "author": "AkiVer",
6
6
  "license": "MIT",