Skip to content

feat: added voicechat recording primitive#454

Merged
Vauff merged 1 commit into
Source2ZE:voicechatrecordingfrom
personcopperfine:voicechatrecording
Jul 10, 2026
Merged

feat: added voicechat recording primitive#454
Vauff merged 1 commit into
Source2ZE:voicechatrecordingfrom
personcopperfine:voicechatrecording

Conversation

@personcopperfine

Copy link
Copy Markdown

Adds a primitive for recording a player's voice chat for content moderation (using AI transcription for said words or human review for example).

A basic rundown is that the game supports multiple codex, in older source titles sv_voicecodec controlled it, I'm assuming modern CS2 is using 48,000 with 1 mono channel. libopus is included in the sniper SDK but windows requires edits for visual studio code.

enum VoiceDataFormat_t {
	VOICEDATA_FORMAT_STEAM = 0;
	VOICEDATA_FORMAT_ENGINE = 1;
	VOICEDATA_FORMAT_OPUS = 2;
}

References:
https://github.com/DandrewsDev/CS2VoiceData/tree/main/
https://zhenyangli.me/posts/reversing-steam-voice-codec/
https://github.com/unicbm/cs2-demotracer/tree/main

@Vauff

Vauff commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

The functionality exposed here is certainly interesting, but I'm hesitant to actually merge this into the main repository for a couple reasons. We're normally not necessarily against exposing things that would need further implementation in custom forks to really be useful (there's existing examples of this in the codebase). But after doing some experimentation with how this would hook up to a proper backend, the implementation ended up being completely redone to better support that use case anyways. The debug command causing build failures due to the Opus requirement also isn't great, especially since a backend can receive the raw data and do the Opus decoding there.

Regardless, this is a good proof of concept to at least have up, the PR would get auto-closed whenever the dev branch gets merged, so maybe I'll merge this into its own feature branch for any future reference.

@Vauff Vauff changed the base branch from dev to voicechatrecording July 10, 2026 21:15
@Vauff Vauff merged commit 95f9ceb into Source2ZE:voicechatrecording Jul 10, 2026
2 of 3 checks passed
Vauff pushed a commit that referenced this pull request Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants