CrowdAudioComponent advanced configuration

This page includes some extra functionality present in the crowd audio component, which could be useful for users exploring deeper into crowd audio:

Choppiness Detection

The crowd audio component has a PollConnectionHealth function, that checks whether there have been any dropped audio packets in the time since the last time PollConnectionHealth was called. It calls OnConnectionHealthResult with the result of the poll. This can be used to track whether there are any issues with audio, e.g. notifying users if they have a spotty connection.

Some example logic in the deprecated BPMC_CrowdAudio for tracking connection health. It has been removed from our current example content since it is not currently being used/hooked up to UI, but could be added to a downstream project if desired.

Disabling using voice

SetVoiceInputEnabled is the function used to turn voice chat on or off. We call this directly in our example voice chat functionality. The function is overridable, so if you want to inject checks that reject calls to this function, that can be done.

BPMC_M2Example_CrowdAudioComponent overrides SetVoiceInputEnabled, blocking requests to enable voice if CanUseVoice is false. This function is blank by default, but can be extended if desired

Voice transcription

If the game Moderation.UseSpeechToText live config flag is true, then (the local player's) voice chat will be run through a local speech recognition application, to obtain transcripts. This is then broadcast via the CrowdAudioComponent's OnCrowdAudioSpeechTranscriptionAvailable event. (Sections of speech are transcribed and broadcast as strings).

These voice transcripts are sent automatically to our moderation system, where we use Community Sift to observe voice transcriptions, and optionally e.g. ban or mute players.

If you want to implement your own moderation, you can independently bind to OnCrowdAudioSpeechTranscriptionAvailable, and handle the transcriptions how you like. Unfortunately, we are not able to expose the raw voice data to downstream projects.

NOTE: This logic is only present if the crowd audio component used by your project extends JM_CrowdAudioComponent (this is the case for our default BPMC_M2Example_CrowdAudioComponent)

Last updated

Was this helpful?