WhisperLib 图标

WhisperLib

作者:rebot | 分类:模组

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

Minecraft 版本: 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6

平台: forge

标签: library

资源介绍

? WhisperLib

An Event-based voice recognition mod that uses WhisperAI to transcript audio to text. Forked from VoskLib.


✨ Features

  1. Offline Recognition: Uses WhisperAI offline. No audio is sent to servers!
  2. Completely Client-side: The mod does not run WhisperAI to any Minecraft server.
  3. Built-in Model Manager: The mod includes a built-in Model Manager.
  4. Dynamic Loading: Displays avaliable models from HuggingFace.
  5. Adjustable Microphone Settings: Added settings screen to adjust mic related settings that wasn't in VoskLib yet.
  6. Security Feature: Immediately gets you notified when WhisperLib is listening.

? Installation for Users

  1. Download this mod from Curseforge.
  2. Launch the game and click Mods button.
  3. Locate WhisperLib and press Config.
  4. Select your model and press Download.
  5. After downloading, click your downloaded model.
  6. Pres Save & Exit.

That's it.


? Installation for Developers

  1. Locate build.gradle.

  2. 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"))
    }
  3. Build the project and check if there's any issues.

  4. 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


下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Burger Gapples

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

查看详情
Block Breakers (Pickaxe Block)

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

查看详情
Triangle Crosshair

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

查看详情
Modern Glass Backport

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

查看详情