WhisperLib
A fork of VoskLib that uses WhisperAI instead of VOSK for voice recognition
介绍
🎤 WhisperLib
An Event-based voice recognition mod that uses WhisperAI to transcript audio to text. Forked from VoskLib.
✨ Features
- Offline Recognition: Uses WhisperAI offline. No audio is sent to servers!
- Completely Client-side: The mod does not run WhisperAI to any Minecraft server.
- Built-in Model Manager: The mod includes a built-in Model Manager.
- Dynamic Loading: Displays avaliable models from HuggingFace.
- Adjustable Microphone Settings: Added settings screen to adjust mic related settings that wasn’t in VoskLib yet.
- Security Feature: Immediately gets you notified when WhisperLib is listening.
📦 Installation for Users
- Download this mod from Curseforge.
- Launch the game and click
Modsbutton. - Locate
WhisperLiband pressConfig. - Select your model and press
Download. - After downloading, click your downloaded model.
- Pres
Save & Exit.
That’s it.
🔨 Installation for Developers
- Locate
build.gradle.
- Add the following:
dependencies {
// ...your dependencies
// Make sure it's in our Runtime (Do not shade these libraries)
implementation 'io.github.givimad:whisper-jni:1.7.1'
runtimeOnly 'io.github.givimad:whisper-jni:1.7.1'
// Include the dev mod jar
implementation fg.deobf(files("libs/whisperlib--dev.jar"))
}
- Build the project and check if there’s any issues.
- If there’s, you can contact me via Curseforge PMs or GitHub issues.
🔌 WhisperLib API
// Start Listening
VoiceManager.startListening();
// Stop Listening
VoiceManager.stopListening();
WhisperLib and VoskLib are posting their results in Forge Event Bus at Client-side.
@Mod.EventBusSubscriber(modid = "examplemod", bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT)
public class VoiceEvents {
@SubscribeEvent
public static void onResult(WhisperVoiceResult event) {
// Get the full text.
String result = event.getText();
if (result.toLowerCase().contains("hello")) {
System.out.println("Hi!");
}
// Use the following method to exclude messages like:
// [MUSIC], [upbeat music], etc. (does not exclude *laughing*)
String filteredText = event.getSpokenText();
// do more processing...
}
}
📜 Credits
- Fork of: VoskLib by InfinityTwo.
- WhisperAI API: OpenAI (WhisperAI)
常见问题
WhisperLib 支持哪些 Minecraft 版本?
WhisperLib 支持 Minecraft Java 版 1.20.1–1.20.6,共 6 个版本,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
WhisperLib 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅客户端。
MeroSsSany 的其他作品
查看全部 →Startup Music Tone
Plays any music during the game's loading screen
VoskLib
A library mod that ports VOSK to Minecraft
Slip of a Tongue: Whisper Edition
A fork of Slip of a Tongue that uses WhisperLib instead of VoskLib. Put words in list so when players say the word (via mic), a series of commands will be run.
Startup Music Tone
Plays music as soon as the window appears
评论
登录后评论和评分