feat: added voicechat recording primitive#454
Conversation
|
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. |
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_voicecodeccontrolled 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.References:
https://github.com/DandrewsDev/CS2VoiceData/tree/main/
https://zhenyangli.me/posts/reversing-steam-voice-codec/
https://github.com/unicbm/cs2-demotracer/tree/main