VoiceGuard
AI voice chat moderation for Simple Voice Chat: speech is turned into text, checked against word lists, and repeat offenders climb a mute and voice ban ladder.
Requirements
- Paper or Folia 1.21+ (Folia is supported). VoiceGuard is built against Paper 1.21.11.
- Java 21
- A valid license key
- Simple Voice Chat installed on the server. VoiceGuard loads without it, but moderation stays off until it is present.
- A speech-to-text provider with an API key: Groq, OpenAI, or your own server.
- The rules dialog (
tos.display: DIALOG) and the/voice statswindow need Paper 1.21.6 or newer. Settos.display: GUIto use a chest menu for the rules instead.
Installation
- Drop
VoiceGuard.jarintoplugins/. - Start the server once to generate the config files in
plugins/VoiceGuard/. - Put your license key in
config.ymlunderlicense-key. The plugin disables itself when the key is missing or invalid. - Open
voice/voicechat.yml, chooseai.providerand set theapi-keyof that provider. - Run
/voiceguardreload.
Required libraries (sqlite-jdbc, json-simple) are downloaded automatically on first start.
Files created in plugins/VoiceGuard/:
| File | Purpose |
|---|---|
config.yml |
License key, colors, language, default punishment lengths, offense reset, Discord logging, debug |
escalation.yml |
The punishment ladder used when the voice filter catches a rule break |
voice/voicechat.yml |
AI provider, audio capture, mute handling, rules (terms of service), flag action |
voice/voicefilter.yml |
Word lists per language and the English-only warning |
gui/voicetos.yml |
Layout of the chest rules menu (used when tos.display is GUI) |
languages/<code>/messages.yml |
Every message. en, de, es and fr are included |
voiceguard.db |
SQLite database with punishments and accepted rules |
When the plugin updates, missing keys are added to your files and your values are kept. A report of what changed is written to migration-report.txt.
How it works
- Simple Voice Chat sends VoiceGuard each player's microphone audio.
- VoiceGuard joins it into speech clips, shrinks the audio, and sends each clip to your provider.
- The provider returns the text and the detected language.
- The text is checked against the word list of that language (
voice/voicefilter.yml). Case, accents and common letter swaps such as1foriare ignored. A single word must match as a whole word, a phrase matches anywhere in the text. - On a match, VoiceGuard applies the next step of
escalation.yml, or runs your own commands (seeflag-action).
Clips shorter than capture.min-utterance-ms are thrown away. While mute.blocks-voice is true, players who are voice banned or muted are not transcribed. Players who have not accepted the rules are blocked from speaking and are not transcribed.
Commands
| Command | Aliases | Description | Permission |
|---|---|---|---|
/voice stats |
Show moderation statistics (a dialog for players, text in console) | voiceguard.stats |
|
/voicetos |
Read the voice chat rules and accept or decline them | none | |
/voicetos reset <player|all> |
Make one player, or everyone, accept the rules again | voiceguard.admin |
|
/voiceban <player> [duration] [reason...] |
/vban |
Ban a player from voice chat | voiceguard.punish.vban |
/voiceunban <player> |
/unvoiceban, /vunban |
Remove a voice ban | voiceguard.punish.vban |
/voicemute <player> [duration] [reason...] |
/vmute |
Mute a player in voice chat | voiceguard.punish.mute |
/voiceunmute <player> |
/unvoicemute, /vunmute |
Remove a voice mute | voiceguard.punish.mute |
/voiceguardreload |
/vgreload |
Reload VoiceGuard, the voice filter and the voice settings | voiceguard.reload |
/voicefilterreload |
Same as /voiceguardreload |
voiceguard.reload |
|
/voicemod [on|off] |
/voicemoderation |
Turn AI voice moderation on or off. Without an argument it flips the current state. Saved to voice/voicechat.yml |
voiceguard.toggle |
/voicechatdebug [on|off] |
Turn voice debug output in the console on or off. Without an argument it flips the current state. Saved to voice/voicechat.yml |
voiceguard.admin |
|
/voicechatstatus |
Show whether moderation is enabled, whether Simple Voice Chat is loaded and whether the AI credentials are set | voiceguard.admin |
|
/voicewebhooktest |
Send a test message to the Discord webhook | voiceguard.admin |
Notes:
/voicetosis for players. It opens the rules dialog or menu, and is only useful whiletos.enabledistrue.durationacceptss,m,h,dandw, can be combined (1d12h), andpermmeans permanent. If the second argument is not a valid duration, it is treated as the start of the reason.- Without a duration,
/voicebanusesdefaults.vban-durationand/voicemuteusesdefaults.mute-duration. Without a reason, thepunish.default-reasonmessage is used. - The target of a punishment command must be online or known to the server (cached). Tab completion lists online players.
- A new punishment is refused when the player already has one of the same kind that lasts equally long or longer. A longer one replaces the old one.
- Manual punishments do not count toward the offense ladder.
- Reload commands also re-apply the voice lock of every online player.
Permissions
| Permission | Default | Description |
|---|---|---|
voiceguard.stats |
op | /voice stats |
voiceguard.punish.vban |
op | /voiceban and /voiceunban |
voiceguard.punish.mute |
op | /voicemute and /voiceunmute |
voiceguard.reload |
op | /voiceguardreload and /voicefilterreload |
voiceguard.toggle |
op | /voicemod |
voiceguard.admin |
op | /voicechatdebug, /voicechatstatus, /voicewebhooktest, /voicetos reset |
voiceguard.notify |
op | Receive a notice in chat whenever someone is punished |
voiceguard.* |
op | Grants every permission above |
Players need no permission to use voice chat or /voicetos.
Configuration
config.yml
| Key | Default | Description |
|---|---|---|
config-version |
2 |
Settings format version. Do not change it. VoiceGuard uses it to add new settings to your files when you update |
license-key |
empty | Your license key |
accent-color |
�D4FF |
Main color, written as &#RRGGBB. Used wherever {accent} appears. An invalid value falls back to the default |
colors.success / error / warning / muted / separator / info / white |
�FF9D / &#FF4D4D / &#FFD166 / 	AA7B5 / C6773 / &#C77DFF / &#FFFFFF |
Shared palette, used as {success}, {error} and so on inside messages |
language.default |
en |
Language folder used for messages (languages/<name>/messages.yml) |
defaults.vban-duration |
1d |
Length of /voiceban when no duration is given |
defaults.mute-duration |
1h |
Length of /voicemute when no duration is given |
escalation.reset-after-days |
60 |
Offenses older than this many days stop counting toward the next ladder step |
discord.webhook-url |
empty | Discord webhook address. Leave empty to turn Discord logging off |
discord.voice-flag |
true |
Post an embed when someone is flagged by the voice filter |
discord.punishments |
true |
Post an embed when staff mute, ban, unmute or unban someone |
discord.voice-clip |
false |
Post every transcribed clip. Busy, mostly useful for testing |
discord.attach-clips |
true |
Attach the audio clip to flag embeds |
discord.embed-color |
16731469 |
Embed color as a whole number |
discord.timeout-seconds |
10 |
Longest wait for Discord to answer |
discord.max-pending |
20 |
Most webhook posts waiting at once. Extra posts are skipped so a Discord outage cannot pile up |
discord.username |
VoiceGuard |
Name shown as the webhook sender. Leave empty to use the webhook default |
discord.mention |
empty | Text posted above each embed, for example <@&123456789> to ping a role |
debug.enabled |
false |
Print debug lines to the console |
debug.categories |
{} |
Categories logged while debug is on. A category not listed is logged |
escalation.yml
The ladder is read from the voice_abuse category (also reachable as voice or voice_chat). That category must exist, or the voice filter cannot punish anyone.
| Key | Default | Description |
|---|---|---|
categories.voice_abuse.display |
Voice Abuse |
Name shown for the category |
categories.voice_abuse.aliases |
voice, voice_chat |
Other names that select the category |
categories.voice_abuse.offenses.<n>.punish |
see below | MUTE (voice mute) or VBAN (voice ban) |
categories.voice_abuse.offenses.<n>.length |
see below | How long it lasts, for example 10m, 1h, 3d or perm |
categories.voice_abuse.offenses.<n>.reason |
see below | Reason recorded with the punishment |
Default ladder:
| Offense | Punishment | Length | Reason |
|---|---|---|---|
| 1 | MUTE |
10m |
First Offense |
| 2 | MUTE |
1h |
Second Offense |
| 3 | MUTE |
1d |
Third Offense |
| 4 | MUTE |
perm |
Repeated Offense |
A player past the last step keeps getting the last step. A step with an invalid type or length is skipped and an error is logged on startup. Offenses are counted per player and only count when they are newer than escalation.reset-after-days.
voice/voicechat.yml
| Key | Default | Description |
|---|---|---|
enabled |
true |
Moderate voice chat. Also switched by /voicemod |
debug |
false |
Log extra voice debugging details. Also switched by /voicechatdebug |
ai.provider |
custom |
Which provider to use: groq, openai or custom |
ai.request-timeout-seconds |
30 |
Longest wait for a transcription request. Limited to 5 to 60 |
ai.max-concurrent-requests |
6 |
Most transcription requests running at once |
ai.retry.max-attempts |
3 |
Most tries per clip, the first one included. 1 = never retry. Limited to 1 to 10 |
ai.retry.delay-ms |
1000 |
Milliseconds before the next try. Grows with every try. Limited to 100 to 30000. Retries happen when the provider answers HTTP 429, 502, 503 or 504 |
ai.groq.api-key |
empty | Groq API key |
ai.groq.base-url |
https://api.groq.com/openai/v1 |
Groq API address |
ai.groq.stt-model |
whisper-large-v3 |
Speech-to-text model |
ai.openai.api-key |
empty | OpenAI API key |
ai.openai.base-url |
https://api.openai.com/v1 |
OpenAI API address |
ai.openai.stt-model |
whisper-1 |
Speech-to-text model |
ai.custom.api-key |
empty | API key of the custom provider |
ai.custom.base-url |
https://sentinel.spxry.net |
Address of the custom provider |
ai.custom.stt-model |
whisper |
Speech-to-text model |
metrics.enabled |
true |
Ask the custom AI server for its health numbers and show them in /voice stats. Only used when ai.provider is custom |
metrics.poll-seconds |
20 |
Seconds between checks. Limited to 5 to 600 |
metrics.timeout-seconds |
10 |
Longest wait for the AI server to answer. Limited to 2 to 60 |
metrics.alerts.enabled |
true |
Print console warnings when the AI server struggles. Each warning appears once, then again after it recovers and fails again |
metrics.alerts.queue-depth |
3 |
Warn when this many clips are waiting for a worker. 0 = never |
metrics.alerts.p95-ms |
3000 |
Warn when 95 percent of transcriptions take longer than this. 0 = never |
metrics.alerts.memory-percent |
90 |
Warn when the AI server's memory use reaches this percent. 0 = never |
capture.moderation-threads |
4 |
Threads that prepare voice clips. Limited to 1 to 16 |
capture.http-threads |
8 |
Threads that talk to the provider. Limited to 1 to 32 |
capture.upload-downsample |
3 |
Shrinks the audio before sending. 3 sends 16 kHz sound, 1 sends the original 48 kHz. Highest 6 |
capture.min-utterance-ms |
600 |
Shortest speech clip worth transcribing. Shorter clips are thrown away |
capture.silence-gap-ms |
350 |
Silence that ends a speech clip. Lower gives shorter clips sooner, higher keeps whole sentences together |
capture.max-utterance-ms |
8000 |
Longest speech clip before it is cut off |
capture.max-merged-ms |
12000 |
When a player keeps talking while their last clip is still being transcribed, the new speech waits and is joined. This is the longest joined clip |
mute.blocks-voice |
true |
A muted or voice banned player's microphone is blocked too |
mute.reminder-cooldown-ms |
5000 |
Milliseconds between "you are muted" reminders |
mute.refresh-interval-ms |
3000 |
Minimum milliseconds between database re-checks of a speaking player's mute and voice ban |
mute.luckperms.enabled |
true |
Also mute through LuckPerms by running the commands below on every mute and unmute |
mute.luckperms.apply-temp |
lp user {player} permission settemp voicechat.speak false {duration} replace |
Command for a timed mute. {player} and {duration} (for example 600s) are filled in |
mute.luckperms.apply-permanent |
lp user {player} permission set voicechat.speak false |
Command for a permanent mute |
mute.luckperms.remove |
two unset / unsettemp commands |
Commands run on unmute |
language-warning.cooldown-ms |
5000 |
Milliseconds between language warnings to the same player |
language-warning.sound.enabled |
true |
Play a sound with the warning |
language-warning.sound.name |
ENTITY_VILLAGER_NO |
Bukkit sound name |
language-warning.sound.volume |
1.0 |
Volume, 0.0 to 1.0 |
language-warning.sound.pitch |
1.0 |
Pitch, 0.5 to 2.0 |
tos.enabled |
true |
Voice chat stays disabled for a player until they accept the rules |
tos.display |
DIALOG |
DIALOG (a pop-up window) or GUI (a chest menu, layout in gui/voicetos.yml) |
tos.check-seconds |
3 |
Seconds between checks for players who joined voice chat and still have to answer. Limited to 1 to 60 |
tos.reminder-cooldown-ms |
5000 |
Milliseconds between reminders to accept |
tos.body |
five lines | Lines of the rules shown to the player. Supports & codes, &#RRGGBB and the color tokens |
flag-action.mode |
PUNISH |
PUNISH applies the next step of escalation.yml. COMMAND skips the ladder and runs the commands below from the console |
flag-action.commands |
mute {player} 10m Voice chat abuse |
Commands run in COMMAND mode. Placeholders: {player}, {uuid}, {rule}, {language}, {transcript}. Replace the example with the command of your punishment plugin |
flag-action.cooldown-ms |
10000 |
Minimum milliseconds between command runs for the same player |
In COMMAND mode, {rule}, {language} and {transcript} are stripped of special characters and cut to 100 characters before they are put into the command.
When the player has declined the rules, they cannot speak until they run /voicetos and accept, or until they join again.
voice/voicefilter.yml
| Key | Default | Description |
|---|---|---|
enabled |
true |
Check transcripts against the word lists |
english-only.enabled |
false |
Warn (never punish) players who speak a language other than expected-language |
english-only.expected-language |
en |
Language code players are expected to speak |
languages.<code> |
see file | Words and phrases flagged when speech is detected as that language code |
languages.default |
see file | Fallback list used when the detected language has no list of its own |
Included lists: default, en, es, fr, de, pt, ru and it. Add your own language code as a new list. The warning text is blocked.voice-language in the messages file, and its sound and cooldown are under language-warning in voice/voicechat.yml.
gui/voicetos.yml
The chest rules menu, used when tos.display is GUI. If it cannot be opened, VoiceGuard shows the dialog instead.
| Key | Default | Description |
|---|---|---|
title |
{accent}&lVoice Chat Rules |
Menu title |
rows |
3 |
Number of rows, 1 to 6 |
rules.slot |
13 |
Slot of the book that shows the rules (0 is the top left corner) |
rules.material / name / lore |
KNOWLEDGE_BOOK / {accent}&lServer Rules / lore |
The rules item. {rules} in the lore is replaced by the lines of tos.body |
decline.slot |
11 |
Slot of the decline button |
decline.material / name / glow / lore |
RED_STAINED_GLASS_PANE / &#FF0000&lDecline / false / lore |
The decline button. It closes the menu without accepting |
accept.slot |
15 |
Slot of the accept button |
accept.material / name / glow / lore |
LIME_STAINED_GLASS_PANE / �FF5A&lAccept / true / lore |
The accept button |
Messages
Every message lives in languages/<code>/messages.yml, in the language chosen by language.default. Included languages: en, de, es and fr. Missing keys are added from the bundled file on start and reload.
Messages accept & codes, &#RRGGBB hex, {prefix}, {accent} and the color tokens {success}, {error}, {warning}, {muted}, {separator}, {info} and {white} from config.yml.
| Section | Contents |
|---|---|
prefix |
Chat prefix used by {prefix} |
blocked.* |
Notices for voice banned, muted and wrong-language players |
commands.* |
No permission and player-only messages |
punish.* |
Punishment notices to the target and to staff, revoke messages, usage, duration units |
voice.* |
Rules dialog texts, accept and decline buttons, /voicetos reset messages |
voice-debug.* |
/voicemod, /voicechatdebug and /voicechatstatus output |
voicestats.* |
Every line of /voice stats |
discord.* |
Embed titles and field names, webhook test messages |
metrics.* |
Console warnings about the AI server |
reload.done |
Shown after a reload |
Punishment notices use these placeholders: %player%, %staff%, %reason%, %duration% and %id%.
Placeholders
None. VoiceGuard does not register a PlaceholderAPI expansion. The %value%, %player% style tokens in the messages file are filled in by the plugin itself.
Integrations
| Plugin | Use |
|---|---|
| Simple Voice Chat | Required for moderation (soft dependency). VoiceGuard registers itself with it and reads microphone audio. Only players who have the Simple Voice Chat mod installed are asked to accept the rules |
| LuckPerms | Optional. On every mute VoiceGuard runs the mute.luckperms commands, which take voicechat.speak away from the player and give it back on unmute. This works on top of the built-in mute. Set mute.luckperms.enabled to false to turn it off |
| Discord | Optional webhook logging for flags, punishments, clips and a test command. See discord in config.yml |
| Your own AI server | Set ai.provider: custom and point ai.custom.base-url at it. VoiceGuard calls POST <base-url>/audio/transcriptions with Authorization: Bearer <api-key>, and optionally GET <base-url>/metrics for the health numbers |
Developer API
VoiceGuard has no public API and fires no custom events.
Troubleshooting and FAQ
Nothing happens when players talk.
Run /voicechatstatus. Check that moderation is enabled, that Simple Voice Chat is loaded, and that the AI credentials are set (an api-key under the provider chosen in ai.provider, plus a base address and model). Turn on /voicechatdebug on and watch the console for [VOICE] lines.
The plugin turns itself off at startup.
The license-key in config.yml is missing or invalid.
Players are asked to accept rules before they can speak.
That is tos.enabled. Set it to false to skip the rules. Use /voicetos reset <player|all> to make players accept again.
The rules dialog does not open.
Dialogs need Paper 1.21.6 or newer. Set tos.display: GUI to use the chest menu.
A player was muted but can still speak.
Check mute.blocks-voice is true. If you use LuckPerms, check that lp runs from the console, or set mute.luckperms.enabled: false. A muted player is reminded in chat at most every mute.reminder-cooldown-ms.
A flagged player was not punished.
Flagged players who already have an active voice ban are skipped, and the voice_abuse category must exist in escalation.yml. Players flagged in COMMAND mode are limited by flag-action.cooldown-ms. Check /voice stats for the "Flagged but already voice banned" count.
Clips are too short or sentences are cut in half.
Raise capture.silence-gap-ms and capture.max-utterance-ms. Lower capture.min-utterance-ms to catch very short words.
Transcription is slow or clips are dropped.
Lower the load with capture.upload-downsample (higher means smaller uploads) or raise ai.max-concurrent-requests if your provider allows it. With a custom server, /voice stats shows its queue, CPU, memory and speed, and the console warns when it struggles (metrics.alerts).
Does it work on Folia? Yes. Folia is supported.

