Modulate's Voice Chat Moderation Library
The contents of this library are Confidential and Proprietary to Modulate, Inc. They may not be shared or distributed without permission from Modulate. Email suppo.nosp@m.rt@m.nosp@m.odula.nosp@m.te.a.nosp@m.i with requests, bug reports, or questions! Last updated February 13, 2024.
This library enables realtime moderation of voice chat by detecting disruptive behavior and escalating instances to a human moderation team, or taking autonomous action. This SDK is the beginning of the moderation process: it hooks into a player's live voice chat session and listens to their chat, accumulates information about developer-permitted variables such as game state, conducts initial disruptive behavior triage on-device, and escalates disruptive speech to Modulate's virtual private cloud for analysis.
Visit https://console.modulate.ai to view the moderation dashboard and start understanding the nature of voice chat in your game! If you have not received an invitation email to create an account, please send an email to suppo.nosp@m.rt@m.nosp@m.odula.nosp@m.te.a.nosp@m.i and we can assist you from there.
The tox/include subdirectory contains the header file exposing the ToxMod API (tox.h). The tox/lib directory contains the associated shared library (tox/lib/libtox.*) as well as a few standard shared library dependencies. These libraries should be distributed with your application or otherwise be available on the end users' devices; in the case of the standard dependencies, if you already include a compatible version of the library (see Dependencies below) feel free to link to those instead.
For testing purposes, an example program is distributed in example/, which reads in a .opus file in realtime and moderates it with the ToxMod system.
ToxMod uses libopus.1.3.1 and libopusenc.0.2.1 for audio compression before uploading. Shared libraries for both are included alongside libtox in this release. Place them in the library loading path of your application or ToxMod will not function correctly. ToxMod uses libcurl for audio upload. A DLL for curl (and its dependency zlib) are included in this release for Windows. The library is not provided in other releases, as it comes standard on macOSX and Linux distributions. ToxMod uses libfvad for on-device voice activity detection. This ensures ToxMod will only activate when a user is speaking. The shared library for libfvad is included in this release for all platforms.
The example program (example/main.c) showcases the flow for using ToxMod. The basic steps are:
example/ directory and run make test. On Windows, open the included Visual Studio project, build it, and run it inside Visual Studio or directly in a command prompt. This will build the test executable, link libtox and its dependencies, and run the example program against a provided test .opus file.