# 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.

<figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-adca3c922f72db410a0cd8c6fc16b75e8b9343c6%2Fimage.png?alt=media" alt=""><figcaption><p>Some example logic in the deprecated <code>BPMC_CrowdAudio</code> 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.</p></figcaption></figure>

## 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.

<figure><img src="https://1456550285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoWTlPaoHd1McSakqMigu%2Fuploads%2Fgit-blob-1731c4be59c1c9edc64a2363c94b723f6fddc20e%2Fimage.png?alt=media" alt=""><figcaption><p><code>BPMC_M2Example_CrowdAudioComponent</code> overrides <code>SetVoiceInputEnabled</code>, blocking requests to enable voice if <code>CanUseVoice</code> is false. This function is blank by default, but can be extended if desired</p></figcaption></figure>

## 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 [moderation](https://docs.msquared.io/creation/unreal-development/features-and-tutorials/communication/moderation "mention") 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.

{% hint style="info" %}
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`)
{% endhint %}
