
Shriek
A Minecraft speech to text library; detect what your players say!
- Загрузки
- 10K
- Подписчики
- 7
- Обновлён
- 11 декабря 2025 г.
- Лицензия
- All-Rights-Reserved
Опубликован 4 сентября 2025 г.
Shriek
A maintained version of VoiceLib by Volcano Bay Studios
A speech to text library that can listen to your microphone and understand what you're saying! Using the power of Vosk, you can speak into your microphone and get an output, and even use multiple languages!
Implementation
repositories {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
dependencies {
modImplementation "maven.modrinth:shriek:1.1.01+fabric"
}
Usage
ShriekApi is the class for the API. The following are the methods you will be using
import com.pryzmm.client.event.EventHandler;
EventHandler.setModel();
// This will set the language model, defined in https://alphacephei.com/vosk/models
// Language models vary in size; the default is vosk-model-small-en-us-0.15, which is ~40 MB compressed, while others like vosk-model-ru-0.10 are ~2.5GB compressed
// Changing models will restart a restart to download, or a call from EventHandler.getOrCreatePath();
ShriekApi.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.
ShriekApi.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.
ShriekApi.setPrintToChat(boolean printToChat)
// This is only on the client. This sets whether or not to
// print client speak events to chat. (Default False)
ShriekApi.setPrintToConsole(boolean printToConsole)
// Same as printToChat but for the console instead. (Default False)
Example
This method makes it so if any player on the server says "ouch" they light on fire
ShriekApi.registerServerPlayerSpeechListener((serverPlayerTalkEvent -> {
if (serverPlayerTalkEvent.getText().contains("ouch"))
serverPlayerTalkEvent.getPlayer().igniteForSeconds(2);
}));
You can also see this in ShriekExample through GitHub
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. The default model is ~40MB compressed and may freeze your game for a couple seconds while setting up the model.
- This mod by default, constantly records and sends all text data to the server. This means if a server modification has set up their mod to, they can listen into your conversation. Please be weary of this.
- The push to mute key will turn OFF your microphone whilst held
- Other mods have the ability to toggle recording on/off
Ченджлог
1.1.2+neoforgeРелиз1.21.9, 1.21.10, 1.21.11 · 11 декабря 2025 г.
- Added 1.21.9-1.21.11 support
- Changed internal KeyMapping to use constructors to support newer versions
1.1.2+fabricРелиз1.21.9, 1.21.10, 1.21.11 · 11 декабря 2025 г.
- Added 1.21.9-1.21.11 support
- Changed internal KeyMapping to use constructors to support newer versions
1.1.1+neoforgeРелиз1.21.6, 1.21.7, 1.21.8 · 11 сентября 2025 г.
- Added support from 1.21 up to 1.21.8
- Marked setPrintToChat() as deprecated, consider using your own methods to print to chat through registerServerPlayerSpeechListener()
1.1.1+fabricРелиз1.21.6, 1.21.7, 1.21.8 · 11 сентября 2025 г.
- Added support from 1.21 up to 1.21.8
- Marked setPrintToChat() as deprecated, consider using your own methods to print to chat through registerServerPlayerSpeechListener()
1.1.01+neoforgeРелиз1.21, 1.21.1 · 8 сентября 2025 г.
- Updated the README on the github to include how to implement into your mod, as well as elaboration on how to change the model
- Changed 'Push to Talk' to 'Push to Mute', since before it was contradictory
- The .zip file previously unzipped was never getting deleted, and it was setting there doing nothing, so that's fixed
- Changed Library build.grable to use api rather than Implementation, so you don't have to import vosk twice and waste storage
- Disabled the example that is enabled by default (This is a Library, examples shouldn't be enabled qwq)
- Replaced URL method with URI for better security
- Eliminated a bunch of warnings I got in EventHandler.java when loading the project in IntelliJ
1.1.01+fabricРелиз1.21, 1.21.1 · 8 сентября 2025 г.
- Updated the README on the github to include how to implement into your mod, as well as elaboration on how to change the model
- Changed 'Push to Talk' to 'Push to Mute', since before it was contradictory
- The .zip file previously unzipped was never getting deleted, and it was setting there doing nothing, so that's fixed
- Changed Library build.grable to use api rather than Implementation, so you don't have to import vosk twice and waste storage
- Disabled the example that is enabled by default (This is a Library, examples shouldn't be enabled qwq)
- Replaced URL method with URI for better security
- Eliminated a bunch of warnings I got in EventHandler.java when loading the project in IntelliJ
Комментарии
Загружаем…
