Notematic Vocoder
Notematic Vocoder 是一款独特的、完全基于服务器端的 Minecraft Java 插件,它利用游戏内的音符盒音效和声音事件,将文本输入直接转换为模拟的人类语音。
[!IMPORTANT]
前置要求: 此插件需要在服务器上安装并启用 Notematic Player。它使用 Notematic Player 引擎来调度音符、解析结构体以及处理数据包播放。
受 Mark Rober 的“说话钢琴” 启发,该插件使用数字信号处理(DSP)技术分析文本转语音(TTS)音频,提取共振峰频率,并将其动态映射到 Minecraft 的声音系统,使音符盒能够实时“说话”。
视频展示
观看并聆听 Notematic Vocoder 的实际效果:
英语语音演示(说英语)
中文语音演示(切换语言)
主要功能
- 实时游戏内语音: 通过
/<command> <prompt> 命令使用音符盒进行语音播报。
- 6 个八度的音域: 智能地在 5 种音符盒乐器(低音吉他、原声吉他、竖琴、长笛、钟琴)之间映射重叠的频率,从而突破 Minecraft 默认的 2 个八度限制。
- 完整的 DSP 流程: 运行快速傅里叶变换(FFT)、共振峰跟踪滤波器,以及齿音/爆破音辅音分类器(使用过零率和平坦度)。
- 自定义口音区域与音色: 通过 Google TTS API 选择男/女声以及各种发音口音(例如:英语、中文、法语、日语、澳大利亚英语)。
- 零延迟音频缓存: 自动缓存生成的语音文件,以便重复短语即时回放,无需再次调用 API。
- 100% 服务端: 玩家无需安装任何模组或资源包。完全兼容原版客户端。
工作原理:6 个八度绕过机制
原版 Minecraft 音符盒仅支持 2 个八度(0.5 至 2.0 音高比例,MIDI 值 54-78)。为了使语音可辨,Notematic Vocoder 通过组合 5 种乐器,将可演奏音阶扩展至 6 个完整八度(72 个半音):
- Bass(低音吉他)(MIDI 30 - 54)—— 用于深层人声共振峰
- Guitar(原声吉他)(MIDI 42 - 66)—— 用于较低的中频
- Harp(竖琴)(MIDI 54 - 78)—— 用于中心人声频率
- Flute(长笛)(MIDI 66 - 90)—— 用于较高的人声范围
- Bell(钟琴)(MIDI 78 - 102)—— 用于高频谐波泛音
当发送提示词时:
- 共振峰被提取并映射到最接近的重叠乐器八度音。
- 清擦音(如
/s/ 和 /sh/)使用 TNT 引信嘶嘶声进行模拟。
- 爆破音(如
/p/ 或 /t/)触发按钮点击声和音符盒的军鼓/踩镲声。
命令与权限
命令别名
您可以互换使用以下任一基础命令:
/vocoder(主要)
/speech(别名)
/vocode(别名)
| 命令 |
权限 |
描述 |
默认值 |
/<cmd> <prompt> |
notematicvocoder.use |
为提示词生成语音并播放。 |
所有人 |
/<cmd> settings |
notematicvocoder.use |
显示您的活跃偏好设置和全局设置。 |
所有人 |
/<cmd> settings voice <male|female> |
notematicvocoder.use |
设置您的个人声音偏好。 |
所有人 |
/<cmd> settings <language|lang> <langCode> |
notematicvocoder.use |
设置您的口音区域设置(例如 en、es、fr、ja)。 |
所有人 |
/<cmd> settings default-voice <male|female> |
notematicvocoder.admin |
更新全局默认声音(管理员)。 |
OP |
/<cmd> settings <default-language|default-lang> <langCode> |
notematicvocoder.admin |
更新全局默认语言口音(管理员)。 |
OP |
/<cmd> toggle |
notematicvocoder.admin |
全局切换非管理员的命令访问权限(管理员)。 |
OP |
详细命令指南与口音代码
自定义声音与口音
您可以调整合成器对文本的发音方式。
- 更改您的声音:
/<cmd> settings voice male 或 /<cmd> settings voice female
- 设置不同的语言/口音:
/<cmd> settings lang en-AU(澳大利亚英语)、/<cmd> settings language es(西班牙语)、/<cmd> settings lang ja(日语)。
管理员控制
- 要限制非管理员玩家生成语音(例如节省带宽),请运行
/<cmd> toggle。
- 可以使用
/<cmd> settings default-voice <voice> 和 /<cmd> settings default-lang <lang> 更改全局默认值。
安装与设置
- 确保您已安装 Notematic Player。
- 下载 Notematic Vocoder 的最新版本,并将其放入服务器的
plugins 文件夹中。
- 重启或重载服务器以生成默认配置文件。
- 使用您喜欢的权限管理器设置权限(
notematicvocoder.use 和 notematicvocoder.admin)。
常见问题
这需要客户端模组或资源包吗?
不需要。整个音频翻译和播放过程都在服务器端使用原版声音数据包完成。任何玩家都可以加入并听到它。
生成提示词时会有延迟吗?
所有音频下载和数字信号处理均以异步方式运行。这确保了在生成提示词时,服务器的主要 tick 循环完全不受影响。
可以在我的整合包中使用吗?
可以!欢迎将其包含在任何 Spigot/Paper 服务器包或整合包中。
Notematic Vocoder
Notematic Vocoder is a unique, fully server-side Minecraft Java plugin that turns text input directly into simulated human speech using in-game note block sounds and sound events.
[!IMPORTANT]
Prerequisite: This plugin requires Notematic Player to be installed and active on the server. It uses the Notematic Player engine to schedule notes, parse structures, and handle packet playback.
Inspired by Mark Rober's "Talking Piano", the plugin uses Digital Signal Processing (DSP) to analyze Text-to-Speech audio, extract formant frequencies, and dynamically map them to Minecraft's sound system, allowing note blocks to "talk" in real-time.
Video Showcases
See and hear the Notematic Vocoder in action:
English Speech Demo (Speaking English)
Chinese Speech Demo (Changing Language)
Key Features
- Real-time In-Game Speech: Speak aloud using note blocks via
/<command> <prompt>.
- 6-Octave Voice Range: Intelligently maps overlapping frequencies across 5 note block instruments (Bass, Guitar, Harp, Flute, Bell) to bypass Minecraft's default 2-octave limit.
- Full DSP Pipeline: Runs Fourier Transforms (FFT), formant-tracking filters, and sibilant/plosive consonant classifiers (using zero-crossing rate and flatness).
- Custom Accent Locales & Voices: Choose between male/female voices and various pronunciation accents (e.g. English, Chinese, French, Japanese, Australian) via Google's TTS API.
- Zero-Lag Audio Caching: Automatically caches generated speech files so repeated phrases play back instantly without contacting the API.
- 100% Server-Side: No mods or resource packs required by players. Fully compatible with vanilla clients.
How It Works: The 6-Octave Bypass
Vanilla Minecraft note blocks support only 2 octaves (0.5 to 2.0 pitch scale, MIDI 54-78). To make speech intelligible, Notematic Vocoder extends the playable scale to 6 full octaves (72 semitones) by crossing 5 instruments:
- Bass (MIDI 30 - 54) — For deep vocal formants
- Guitar (MIDI 42 - 66) — For lower midtones
- Harp (MIDI 54 - 78) — For center vocal frequencies
- Flute (MIDI 66 - 90) — For upper vocal range
- Bell (MIDI 78 - 102) — For high-pitched harmonic overtones
When a prompt is sent:
- Formants are extracted and mapped to the closest overlapping instrument octave.
- Unvoiced sibilants (like
/s/ and /sh/) are simulated using TNT fuse hiss.
- Plosives (like
/p/ or /t/) trigger button clicks and note block snare/hats.
Commands & Permissions
Command Aliases
You can use any of the following base commands interchangeably:
/vocoder (Primary)
/speech (Alias)
/vocode (Alias)
| Command |
Permissions |
Description |
Default |
/<cmd> <prompt> |
notematicvocoder.use |
Generates speech for the prompt and plays it. |
Everyone |
/<cmd> settings |
notematicvocoder.use |
Displays your active preferences and global settings. |
Everyone |
/<cmd> settings voice <male|female> |
notematicvocoder.use |
Sets your personal voice preference. |
Everyone |
/<cmd> settings <language|lang> <langCode> |
notematicvocoder.use |
Sets your accent locale (e.g. en, es, fr, ja). |
Everyone |
/<cmd> settings default-voice <male|female> |
notematicvocoder.admin |
Updates the global default voice (Admin). |
OP |
/<cmd> settings <default-language|default-lang> <langCode> |
notematicvocoder.admin |
Updates the global default language accent (Admin). |
OP |
/<cmd> toggle |
notematicvocoder.admin |
Globally toggles command access for non-admins (Admin). |
OP |
Detailed Command Guide & Accent Codes
Customizing Voices and Accents
You can adjust how the vocoder pronounces your text.
- To change your voice:
/<cmd> settings voice male or /<cmd> settings voice female
- To set a different language/accent:
/<cmd> settings lang en-AU (Australian English), /<cmd> settings language es (Spanish), /<cmd> settings lang ja (Japanese).
Admin Controls
- To restrict non-admin players from generating speech (e.g. to save bandwidth), run
/<cmd> toggle.
- Global defaults can be changed using
/<cmd> settings default-voice <voice> and /<cmd> settings default-lang <lang>.
Installation & Setup
- Make sure you have Notematic Player installed.
- Download the latest release of Notematic Vocoder and drop it into your server's
plugins folder.
- Restart or reload the server to generate the default configuration.
- Set up permissions (
notematicvocoder.use and notematicvocoder.admin) using your favorite permissions manager.
FAQ
Does this require a client mod or resource pack?
No. The entire audio translation and playback process happens server-side using vanilla sound packets. Any player can join and hear it.
Is there any lag when generating a prompt?
All audio downloads and digital signal processing run asynchronously. This ensures that your server's main tick loop is completely unaffected while a prompt is generating.
Can I use this in my modpack?
Yes! Feel free to include this in any Spigot/Paper server pack or modpack.
评论 0
登录后参与评分
还没有评论,来抢沙发吧