转录
这是该插件的免费版本。
若要获得插件的全部功能,请考虑购买完整版:前往我的 官方网站 或从 BuiltByBit 获取
一款 Paper 插件,可将简短的语音指令转化为实际的游戏动作。
它利用 Simple Voice Chat 已经捕获的麦克风音频流,因此玩家无需再次按下“按住说话”键,也无需安装除语音聊天模组以外的任何额外模组。
按下触发键(默认为潜行 + F),会开启一个短暂的聆听窗口,你说出服务器词库中的一个词,Transcribe 便会触发事件并执行你的命令。
完全离线运行。 语音识别在您的服务器(或本机)上进行。
音频数据绝不会离开您的基础设施。
我应该下载哪个文件?
| 您的服务器 |
文件 |
Java |
| Paper 1.21 – 1.21.11 |
Transcribe-0.2-mc1.21-1.21.11.jar |
21+ |
| Paper 26.1 |
Transcribe-0.2-mc26.1.jar |
25 |
| Paper 26.2 |
Transcribe-0.2-mc26.2.jar |
25 |
| Paper 26.3 |
Transcribe-0.2-mc26.3.jar |
25 |
功能特性
- 每个法术对应一个文件。 每个关键词都位于
plugins/Transcribe/keywords/ 目录下的独立文件中,拥有独立的别名、权限、最低置信度、冷却时间和命令。在游戏中使用 /transcribe add keyword <word> 即可创建新的关键词。
- 防止误施法。 为每个关键词设置
min-confidence(最低置信度),以防止含糊不清的发音和背景噪音触发法术,对于危险的法术可以提高此阈值。
- 按关键词设置冷却时间,并为管理员提供绕过冷却时间的权限。
- 插件集成。 直接施放 MythicMobs 技能,通过命令驱动 Nexo、ItemsAdder 和 Oraxen,或通过命令桥接连接 任何其他插件。无需编写代码。
- 以控制台或玩家身份运行命令,支持占位符:
%player%、%uuid%、%keyword%、%keyword_id%、%spoken%、%confidence%、%confidence_percent%、%world%、%x%、%y%、%z%,以及任何 PlaceholderAPI 占位符。
- 静音玩家 在指定时间内(
30s、5m、1h30m、1d...)禁止通过语音施法。
- 两种语音转文本后端,供您选择
INTERNAL(内置) - Vosk 直接嵌入服务器 JVM。无需运行额外服务。
EXTERNAL(外部) - 通过持久 WebSocket 将音频流传输到您自己的 STT 服务。保持 Minecraft 服务器的资源占用为零,并单独扩展 STT 服务。
- 词汇量小,准确率和速度极高。 Vosk 被限制在您指定的关键词范围内(例如
fire、light、ice),这使得识别成本低廉且可靠,而非模糊的通用转录。
- 自定义激活方式。 支持八种触发器的任意组合,或 PlaceholderAPI 条件:
OFF_HAND / SNEAK_OFF_HAND(F,或潜行 + F)
LEFT_CLICK / SNEAK_LEFT_CLICK
RIGHT_CLICK / SNEAK_RIGHT_CLICK
HOTBAR_SLOT / SNEAK_HOTBAR_SLOT(选择 1-9 号快捷栏中的任意一个)
- 轮询 PlaceholderAPI 占位符 == 值
- 手势事件可被抑制 (
cancel-trigger-events),这样玩家在施法时实际上不会切换手或挥舞物品。
- 完全可配置的反馈。 窗口打开和关闭时的操作栏文本和声音,音量与音调均可单独设置。兼容原版音效和资源包音效(
mypack:spells.cast)。
- 面向开发者的清洁 API。 包含一个可取消的
VoiceWordSpokenEvent(玩家、关键词、置信度)以及 TranscribeAPI,允许您从自己的代码中检查或强制开启聆听窗口。
- 近乎零的空闲开销。 除非聆听窗口处于开启状态,否则麦克风数据包会在解码前被丢弃。
- 安全的热重载。
/transcribe reload 会重新读取所有配置而无需重启服务器。如果配置文件损坏,当前正常运行的配置将继续工作,并告知您哪一项设置有误。
- 四个级别的调试日志,涵盖音频管道、触发器和识别结果。
依赖要求
- Paper(或 Purpur)1.21 – 1.21.11(Java 21+),或 26.1 – 26.3(Java 25)。
- Simple Voice Chat - 服务端 和 客户端均需安装。
这是硬性依赖;如果没有安装,Transcribe 将无法启用。
- (可选) PlaceholderAPI
- (可选) MythicMobs、Nexo、ItemsAdder 或 Oraxen 用于插件集成
注意: 玩家必须在客户端安装 Simple Voice Chat 模组(Fabric / Forge / NeoForge)。必须是模组,而不仅仅是服务端插件,否则无法捕获音频。
玩家还需要处于语音频道中。
快速入门
- 在服务端和客户端安装 Simple Voice Chat,并确认近距离语音功能正常。
- 将对应版本的 Transcribe jar 放入
plugins/ 目录,然后启动一次服务器。
- (仅限 INTERNAL) 从 下载小型 Vosk 模型,并将其解压到
plugins/Transcribe/models/vosk-model-small-en-us-0.15。
- 创建一个关键词:
/transcribe add keyword fire,然后编辑 plugins/Transcribe/keywords/fire.yml:
enabled: true
keyword: "fire"
min-confidence: 0.60
cooldown-seconds: 5
actions:
executor: CONSOLE
commands:
- "spellcast trigger %player% %keyword%"
- 执行
/transcribe reload,然后潜行 + F 并说出 "fire"。
keywords/example.yml 展示了所有选项,包括别名、自定义权限和集成钩子。
工作原理
触发手势
|
v
开启聆听窗口(可配置,默认 3 秒) -- 操作栏提示 + 声音提示
|
v
Opus 麦克风数据包解码为 48 kHz 单声道 PCM
|
v
语音识别(内部 Vosk,或外部 WebSocket 服务)
|
v
是否匹配您的关键词,且置信度足够高,
玩家有权限且无冷却时间?
| 否 --> 窗口关闭,无任何反应
| 是
v
VoiceWordSpokenEvent(可取消) -- 已取消 --> 无任何反应
| 未取消
v
执行关键词的命令和集成钩子
性能说明
- 识别仅在监听窗口开启时运行。在此之外,数据包会在解码前被丢弃。
- 少量词汇的词汇表会缩小解码器的搜索空间,因此即使
INTERNAL 模式在空闲时也几乎不消耗资源。
- 识别过程在主线程之外进行;只有产生的事件和命令会触及服务器主线程。
- 小型 Vosk 模型(约 40 MB)对于关键词检测来说已经绰绰有余。
配置
plugins/Transcribe/config.yml 包含引擎和激活设置,并在行内进行了注释。每个咒语都位于 plugins/Transcribe/keywords/ 下的独立文件中。
| 键 |
功能 |
debug.level |
0-3,输出 [Transcribe debug] 日志的详细程度 |
engine.mode |
INTERNAL(嵌入式 Vosk)或 EXTERNAL(WebSocket 服务) |
engine.internal.model-path |
解压后的 Vosk 模型路径,位于插件文件夹下 |
engine.internal.grammar |
额外监听的词汇(关键词文件会自动添加) |
engine.external.uri |
你的 STT 服务的 ws:// / wss:// 端点 |
activation.window-seconds |
监听窗口保持开启的时间长度 |
activation.triggers |
哪些手势触发器处于激活状态 |
activation.hotbar-slots |
快捷栏触发器使用的槽位 1-9 |
activation.cancel-trigger-events |
抑制触发器背后的原版动作 |
activation.feedback.* |
打开/关闭操作栏文本和声音 |
activation.placeholderapi.* |
轮询占位符条件触发器 |
recognition.console-commands |
为每个识别到的单词执行的命令 |
permissions.keyword-default |
玩家是否默认可以使用关键词 |
命令与权限
/transcribe(别名 /tsc)
| 命令 |
权限 |
默认值 |
/transcribe add keyword <word> |
transcribe.admin.add |
op |
/transcribe list |
transcribe.admin.list |
op |
/transcribe mute <player> [duration] |
transcribe.admin.mute |
op |
/transcribe unmute <player> |
transcribe.admin.unmute |
op |
/transcribe reload |
transcribe.admin.reload |
op |
| 权限 |
允许的操作 |
默认值 |
transcribe.use |
打开监听窗口并被听到 |
everyone |
transcribe.keyword.<id> / transcribe.keyword.* |
说出一个关键词 / 所有关键词 |
由 keyword-default 设置 |
transcribe.bypass.cooldown |
忽略关键词冷却时间 |
op |
transcribe.admin |
所有管理员命令 |
op |
开发者指南
@EventHandler
public void onSpell(VoiceWordSpokenEvent event) {
if (event.getKeyword().equals("fire") && !hasMana(event.getPlayer())) {
event.setCancelled(true); // 阻止关键词的命令和钩子
}
}
// 以编程方式打开窗口,例如从物品或技能 GUI 中
TranscribeAPI.get().forceStartListenWindow(player, Duration.ofSeconds(3));
if (TranscribeAPI.get().isListening(player)) { /* ... */ }
通过以下方式构建依赖:
compileOnly("org.eyman_:Transcribe:<version>")
注意事项与限制
LEFT_CLICK / SNEAK_LEFT_CLICK 在对空气或方块点击时会触发,但不会对实体攻击时触发——Bukkit 会在那里发出伤害事件,而 Transcribe 并未挂钩该事件。
- 从 0.1.0 升级: 关键词现在位于
keywords/ 目录下。备份你的配置文件,让 0.2 版生成新文件,然后将你的关键词和命令复制过去。
- 旧配置中的
SWAP_HAND / SNEAK_SWAP_HAND 已重命名为 OFF_HAND / SNEAK_OFF_HAND。请更新它们,否则它们将被忽略并显示警告。
- 内置的外部 STT 服务器每个连接一次只处理一个片段;并发玩家通过并发连接提供服务。
- 需要标准的 Bukkit 调度器,因此不支持 Folia。
许可证
GPL-3.0。Simple Voice Chat 是一个单独、独立许可的项目,此处未捆绑也未重新分发——它是必需的运行时依赖项。
描述部分使用了 CLAUDE
Transcribe
THIS IS THE FREE VERSION OF THE PLUGIN.
TO GET THE FULL CAPACITY OF THE PLUGIN PLEASE CONSIDER PAYING FOR THE FULL VERSION: Get it on my official website or get it on BuiltByBit
A Paper plugin that turns short spoken words into real game actions. It
piggybacks on the microphone stream that Simple Voice Chat already captures, so players
don't need to press "push to talk" for a second time and no extra mod is required beyond
the voice chat one.
Press a trigger (sneak + F by default), a brief listen window opens, you say a word from
your server's vocabulary, and Transcribe fires an event and runs your commands.
Runs fully offline. Speech recognition happens on your server (or your own box).
No audio ever leaves your infrastructure.
Which file do I download?
| Your server |
File |
Java |
| Paper 1.21 – 1.21.11 |
Transcribe-0.2-mc1.21-1.21.11.jar |
21+ |
| Paper 26.1 |
Transcribe-0.2-mc26.1.jar |
25 |
| Paper 26.2 |
Transcribe-0.2-mc26.2.jar |
25 |
| Paper 26.3 |
Transcribe-0.2-mc26.3.jar |
25 |
Features
- One file per spell. Every keyword lives in its own file in
plugins/Transcribe/keywords/,
with its own aliases, permission, minimum confidence, cooldown and commands. Make a new one
in-game with /transcribe add keyword <word>.
- No accidental casts. Set a
min-confidence per keyword so mumbles and background noise
don't fire spells, and raise it for the dangerous ones.
- Cooldowns per keyword, with a bypass permission for staff.
- Plugin hooks. Cast MythicMobs skills directly, drive Nexo, ItemsAdder and
Oraxen through their commands, or connect any other plugin with the command bridge.
No code needed.
- Run commands as console or as the player, with placeholders:
%player%, %uuid%,
%keyword%, %keyword_id%, %spoken%, %confidence%, %confidence_percent%, %world%,
%x%, %y%, %z%, plus any PlaceholderAPI placeholder.
- Mute players from voice casting for a set time (
30s, 5m, 1h30m, 1d...).
- Two speech-to-text backends, your choice
INTERNAL - Vosk embedded directly in the server JVM. No extra service to run.
EXTERNAL - streams audio to your own STT service over a persistent WebSocket.
Keep the Minecraft server's footprint at zero and scale STT separately.
- Tiny vocabulary, huge accuracy and speed. Vosk is constrained to exactly your keywords
(e.g.
fire, light, ice), which makes recognition cheap and reliable instead of a fuzzy
general transcriber.
- Bring your own activation. Any combination of eight triggers, or a PlaceholderAPI condition:
OFF_HAND / SNEAK_OFF_HAND (F, or sneak + F)
LEFT_CLICK / SNEAK_LEFT_CLICK
RIGHT_CLICK / SNEAK_RIGHT_CLICK
HOTBAR_SLOT / SNEAK_HOTBAR_SLOT (pick any of slots 1-9)
- a polled PlaceholderAPI placeholder == value
- Gesture events can be suppressed (
cancel-trigger-events) so players don't actually
swap hands or swing while casting.
- Fully configurable feedback. Action bar text and sounds when the window opens and closes,
with separate volume and pitch. Works with vanilla sounds and resource-pack sounds
(
mypack:spells.cast).
- Clean API for developers. A cancellable
VoiceWordSpokenEvent (player, keyword,
confidence) plus TranscribeAPI to check or force-open listen windows from your own code.
- Near-zero idle cost. Microphone packets are dropped before decoding unless a listen
window is open.
- Safe hot reload.
/transcribe reload re-reads everything without a restart. A broken
config keeps the working one running and tells you which setting was wrong.
- Four levels of debug logging for the audio pipeline, triggers and recognition results.
Requirements
- Paper (or Purpur) 1.21 – 1.21.11 on Java 21+, or 26.1 – 26.3 on Java 25.
- Simple Voice Chat - server and client.
This is a hard dependency; Transcribe will not enable without it.
- (optional) PlaceholderAPI
- (optional) MythicMobs, Nexo, ItemsAdder or Oraxen for the hooks
Note: players must install the Simple Voice Chat mod on their client (Fabric / Forge /
NeoForge). It has to be the mod, not just the server plugin, or no audio is ever captured.
Players also need to be in a voice channel.
Quick start
- Install Simple Voice Chat on the server and clients, and check proximity voice works.
- Drop the Transcribe jar for your version into
plugins/ and start the server once.
- (INTERNAL only) Download a small Vosk model from
and unzip it to
plugins/Transcribe/models/vosk-model-small-en-us-0.15.
- Make a keyword:
/transcribe add keyword fire, then edit plugins/Transcribe/keywords/fire.yml:
enabled: true
keyword: "fire"
min-confidence: 0.60
cooldown-seconds: 5
actions:
executor: CONSOLE
commands:
- "spellcast trigger %player% %keyword%"
/transcribe reload, then sneak + F and say "fire".
keywords/example.yml shows every option, including aliases, custom permissions and hooks.
How it works
trigger gesture
|
v
Listen Window opens (configurable, default 3s) -- action bar + sound cue
|
v
Opus microphone packets decoded to 48 kHz mono PCM
|
v
Speech recognition (INTERNAL Vosk, or EXTERNAL WebSocket service)
|
v
one of your keywords, confident enough, -- no --> window closes, nothing happens
player has permission and no cooldown?
| yes
v
VoiceWordSpokenEvent (cancellable) -- cancelled --> nothing happens
| not cancelled
v
keyword's commands and hooks run
Performance notes
- Recognition only runs while a listen window is open. Outside of that, packets are dropped
before decoding.
- A vocabulary of a few words collapses the decoder's search space, so even
INTERNAL mode
costs almost nothing at idle.
- Recognition happens off the main thread; only the resulting event and commands touch the
server thread.
- The small Vosk models (~40 MB) are more than enough for keyword spotting.
Configuration
plugins/Transcribe/config.yml holds the engine and activation settings, and is commented
inline. Each spell lives in its own file in plugins/Transcribe/keywords/.
| Key |
What it does |
debug.level |
0-3, how much [Transcribe debug] logging to emit |
engine.mode |
INTERNAL (embedded Vosk) or EXTERNAL (WebSocket service) |
engine.internal.model-path |
path to an unpacked Vosk model, under the plugin folder |
engine.internal.grammar |
extra words to listen for (keyword files are added automatically) |
engine.external.uri |
ws:// / wss:// endpoint of your STT service |
activation.window-seconds |
how long the listen window stays open |
activation.triggers |
which of the eight gesture triggers are active |
activation.hotbar-slots |
slots 1-9 used by the hotbar triggers |
activation.cancel-trigger-events |
suppress the vanilla action behind a trigger |
activation.feedback.* |
open/close action bar text and sounds |
activation.placeholderapi.* |
polled placeholder condition trigger |
recognition.console-commands |
commands that run for every recognized word |
permissions.keyword-default |
whether players can use keywords by default |
Commands & permissions
/transcribe (alias /tsc)
| Command |
Permission |
Default |
/transcribe add keyword <word> |
transcribe.admin.add |
op |
/transcribe list |
transcribe.admin.list |
op |
/transcribe mute <player> [duration] |
transcribe.admin.mute |
op |
/transcribe unmute <player> |
transcribe.admin.unmute |
op |
/transcribe reload |
transcribe.admin.reload |
op |
| Permission |
What it allows |
Default |
transcribe.use |
open listen windows and be heard |
everyone |
transcribe.keyword.<id> / transcribe.keyword.* |
speak a keyword / all keywords |
set by keyword-default |
transcribe.bypass.cooldown |
ignore keyword cooldowns |
op |
transcribe.admin |
every admin command |
op |
For developers
@EventHandler
public void onSpell(VoiceWordSpokenEvent event) {
if (event.getKeyword().equals("fire") && !hasMana(event.getPlayer())) {
event.setCancelled(true); // stop the keyword's commands and hooks
}
}
// open a window programmatically, e.g. from an item or a skill GUI
TranscribeAPI.get().forceStartListenWindow(player, Duration.ofSeconds(3));
if (TranscribeAPI.get().isListening(player)) { /* ... */ }
Build against it with:
compileOnly("org.eyman_:Transcribe:<version>")
Notes & limitations
LEFT_CLICK / SNEAK_LEFT_CLICK fire for clicking air or a block, but not for
attacking an entity - Bukkit emits a damage event there, which Transcribe doesn't hook.
- Updating from 0.1.0: keywords now live in
keywords/. Back up your config, let 0.2
generate fresh files, then copy your words and commands over.
SWAP_HAND / SNEAK_SWAP_HAND from older configs were renamed to OFF_HAND /
SNEAK_OFF_HAND. Update them or they'll be ignored with a warning.
- The bundled external STT server handles one segment at a time per connection; concurrent
players are served by concurrent connections.
- Requires the standard Bukkit scheduler, so Folia is not supported.
License
GPL-3.0. Simple Voice Chat is a separate, independently licensed project and is neither
bundled nor redistributed here - it is a required runtime dependency.
USED CLAUDE FOR THE DESCRIPTION
评论 0
登录后参与评分
还没有评论,来抢沙发吧