VoiceInputFix

版本 v1.0.9·更新於 2026-02-08

Improves voice command accuracy and response speed with a local offline model. 基於本地離線模型,提升語音指令的識別準確率與響應速度。

模組介紹 作者原文

VoiceInputFix (Fun-ASR / SenseVoice Edition)

Description

VoiceInputFix replaces the default YAPYAP speech recognition engine (Vosk) with Fun-ASR (SenseVoice), providing a modern and more reliable voice input experience:

Key Features

  • Much Better Chinese Recognition — The original Vosk engine has poor Chinese support. This mod significantly outperforms Vosk for Chinese voice commands.
  • Multi-language Support — Automatically detects Mandarin/Cantonese, English, Japanese, Korean, and allows specifying a recognition language.
  • Lower Latency — Voice commands respond faster than the original engine.

Note

  • The Fun-ASR model supports multilingual speech recognition.
  • However, the original Vosk engine shows significantly more stable recognition for English commands in this game

(other non-Chinese languages may behave similarly, but have not been tested), possibly due to its predefined command setup or potential pre-training.

  • Players who primarily use English voice commands are still recommended to use the original Vosk engine.

Dependencies

This mod requires the SherpaOnnxRuntime package to function. It provides the following core libraries:

  • onnxruntime.dll
  • sherpa-onnx-c-api.dll
  • sherpa-onnx.dll

Download Models

You must download the following files for the mod to work:

  • model.onnx (1.03GB) — Download
  • tokens.txt (940KB) — Download

(If the link opens in your browser, press Ctrl+S to save, or right-click and select "Save Link As...")

Alternative Models

  • Must be from the sherpa-onnx-sense-voice series (csukuangfj/sherpa-onnx-sense-voice on Hugging Face).
  • Model package must include model.onnx and tokens.txt and be placed in the models folder.

Installation

  • Critical: VoiceInputFix.dll and the models folder must be in the same directory.
  • Place them directly into BepInEx/plugins, or a subfolder like BepInEx/plugins/VoiceInputFix.

(Avoid Chinese characters in folder paths.)

  • Place model.onnx and tokens.txt inside the models folder.
  • Example path: BepInEx/plugins/VoiceInputFix/models/model.onnx

Performance

  • Initial Loading — First-time engine initialization may cause a significant screen freeze while loading the 1GB model. This is normal.
  • Menu Reloading — Returning to the main menu and re-entering the game introduces a short loading delay, but no freeze occurs.
  • Gameplay — Once a level is entered, recognition works immediately, smoothly, and with no performance impact.

Advanced Configuration

Config file: BepInEx/config/Mhz.voiceinputfix.cfg

  • SpeechThreshold (Default: 0.015) — Noise gate for triggering recognition.
  • Increase if background noise causes text to linger (e.g., 0.025)
  • Decrease if you need to shout to be recognized (e.g., 0.010)
  • Language (Default: auto) — Specify recognition language:
  • auto: Detects all supported languages (Mandarin/Cantonese, English, Japanese, Korean) automatically.
  • zh, en, ja, ko, yue: Prioritize recognition for the selected language.

(This only prioritizes matching, not strictly locking. Extremely similar pronunciations may still be recognized as another language.)

  • EnableDebugLog (Default: false) — Enable to view detailed recognition logs in the BepInEx console.

中文說明

模組簡介

VoiceInputFix 將《YAPYAP》默認 Vosk 引擎替換爲 Fun-ASR (SenseVoice),顯著提升語音輸入體驗:

  • 中文識別大幅提升 — 原版 Vosk 對中文支持較差,本模組在中文指令識別上顯著優於原版
  • 多語言支持 — 默認自動識別 普通話/粵語/英語/日語/韓語,也可指定識別語言
  • 更低延遲 — 語音指令響應速度明顯快於原版

注意

  • Fun-ASR 模型本身支持多語言語音識別
  • 但原版 Vosk 引擎在遊戲內英文指令上的識別表現明顯更穩定

(其他非中文語言可能也類似,但尚未進行測試),可能與其對遊戲內預設指令詞的配置或潛在預訓練有關

  • 對於主要使用英文指令的玩家,仍建議繼續使用原版 Vosk 引擎

必需依賴

本模組依賴 SherpaOnnxRuntime,提供以下核心組件:

  • onnxruntime.dll
  • sherpa-onnx-c-api.dll
  • sherpa-onnx.dll

模型下載

必須下載以下文件:

  • model.onnx (1.03GB) — 點擊下載
  • tokens.txt (940KB) — 點擊下載

(若點擊後直接打開,請按 Ctrl+S 保存,或右鍵“鏈接另存爲”)

更換其他模型

  • 必須來自 sherpa-onnx-sense-voice 系列
  • 文件需包含 model.onnx 和 tokens.txt,放入 models 文件夾

安裝步驟

  • 核心原則:VoiceInputFix.dll 與 models 文件夾必須在同一目錄
  • 可放入 BepInEx/plugins/ 或子目錄(路徑請勿含中文字符)
  • 將 model.onnx 與 tokens.txt 放入 models 文件夾
  • 示例路徑:BepInEx/plugins/VoiceInputFix/model

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPackMhz-SherpaOnnxRuntime

檔案與校驗

檔案名稱
VoiceInputFix-1.0.9.zip
檔案大小
200.2 KiB