Warning: file_put_contents(/www/wwwroot/nmbt.106988770/cache/modrinth_versions_ns91qQYT.json): Failed to open stream: Permission denied in /www/wwwroot/nmbt.106988770/resource_detail.php on line 53
VoiceLib - 墨喵 Minecraft 资源
VoiceLib 图标

VoiceLib

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 2.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/voicelib
资源信息

Minecraft 版本: 1.21.1

平台: fabric

标签: 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)

下载与版本
评论(0)
请 登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

赞助作者

请 登录 后赞助作者。

🔥 相关推荐
LandOfSignals (Railroad Signal Mod)

价格:0 墨喵币
下载量:0

查看详情
Lunnara login

价格:0 墨喵币
下载量:0

查看详情
yuandao(缘之道)

价格:0 墨喵币
下载量:0

查看详情
Command Block Tools-CWSM

价格:0 墨喵币
下载量:0

查看详情