
VoiceLib
Minecraft Voice Recognition Library
About this Mod
VoiceLib
Minecraft text to speech library
Usage
VoiceLibApi is the class for the API.
The following are the methods you will be using
VoiceLibApi.registerServerPlayerSpeechListener(Consumer<ServerPlayerTalkEvent> consumer)
This method registers a ServerPLayerTalkEvent Consumer. Whenever a player speaks,
This event will be fired. The ServerPlayerTalkEvent provides the player, and a string of what they said.
VoiceLibApi.registerClientSpeechListener(Consumer<ClientTalkEvent> consumer)
This method registers a ClientTalkEvent Consumer. This method is only fired on the client.
Whenever the user speaks, this will be fired.
VoiceLibApi.setPrintToChat(boolean printToChat)
This is only on the client. This sets whether or not to
print client speak events to chat. (Default False)
VoiceLibApi.setPrintToConsole(boolean printToConsole)
Same as printToChat but for the console instead. (Default False)
All methods have java docs for information on their usages.
Example
This method makes it so if any player on the server says "ouch" they light on fire
VoiceLibApi.registerServerPlayerSpeechListener((serverPlayerTalkEvent -> {
if (serverPlayerTalkEvent.getText().contains("ouch"))
serverPlayerTalkEvent.getPlayer().igniteForSeconds(2);
}));
You can also see this in VoiceLibExample
Security
There are a few things to note with this mod,
- The mod automatically downloads a vosk model from the internet on the first launch, it is about 40MB
- This mod by default, constantly records and sends all text data to the server. This means a bad actor could listen in on your conversations (But only in text as audio is not sent to the server)
- The push to talk key is inverted by default, this means pressing it turns OFF your microphone
- Other mods can forcefully enable always on recording, they can also disable it (See VoiceLibClient)
Available Versions
How to Install VoiceLib on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set fabric Loader
In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.1).
Install Mod
Open the mod browser in the dashboard and search for "VoiceLib". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
1.21.1, 1.21
Server-side
~ OptionalRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
VoiceLib server crashes on startup – what to do?
Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.1). You can switch loaders with one click in the panel.
Is VoiceLib compatible with fabric and neoforge?
VoiceLib officially supports fabric, neoforge for Minecraft 1.21.1, 1.21. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with VoiceLib – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if VoiceLib consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install VoiceLib with just one click on your server.
