Mineuniverse
Log in Register
Mods

VoiceLib

Minecraft Text To Speech Library
by modogthedev
Download Claim this project
339 downloads
0 likes
Updated Jul 6, 2026
0 hypes
API and Library

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)

voicelib-fabric-1.0.0.jar
MC Fabric, Client, 1.21.1, Server
Release 2024-08-19 Get
voicelib-neoforge-1.0.0.jar
MC Client, NeoForge, 1.21.1, Server
Release 2024-08-19 Get

More from modogthedev

Command Support
7,580
Australium
582
Digestive
577
Sieged Kingdoms Resources
146

You Might Also Like

Vivecraft
A Minecraft VR mod on a loader of your choice!
9,988,339
Athena
A crossplatform (Forge/Fabric) solution to connected block textures for 1.19.4+
99,799,527
Lodestone
A collection of code used throughout projects under the Lodestar team.
9,914,417
TheDragonLib
A library for most of sokratis12GR's Mods
9,910,232
Multi Mob Library
A library mod containing essential files for Daveyx0's mob mods
9,892,767
FTB Library (Forge) (Legacy)
FTB Library is a library mod that is used for some of our mods.
98,265,314