/
VoiceTrigger is a Minecraft NeoForge mod that allows players to control game keys via voice commands. It utilizes the Wav2Vec2 deep learning model combined with custom-trained models for speech recognition and matching, delivering an immersive voice control experience for Minecraft.
.minecraft/mods directoryPress B (default) in-game to open the voice binding settings interface.
The mod supports two voice monitoring modes (configurable):
| Mode | Description |
|---|---|
| Continuous (ON) | Automatically monitors microphone when in-game world, pauses when game is paused |
| Key-triggered (OFF) | Only listens when V key is held |
Configuration file path: .minecraft/config/voice_trigger-client.toml
# Similarity threshold (requires exceeding this value for match)
# Range: 0.0 ~ 1.0, default: 0.75
similarityThreshold = 0.75
# Silence detection threshold (dB)
# Default: -43.0
silenceThreshold = -43.0
# Audio buffer size (bytes)
# Range: 1024 ~ 16384, default: 4096
bufferSize = 4096
# Minimum frames required for match
# Range: 1 ~ 16, default: 3
minFramesForMatch = 3
# Continuous monitoring mode
# ON: Continuous microphone monitoring
# OFF: Listens only when V key is held
continuousMonitoring = "ON"
similarityThreshold (e.g., 0.65)similarityThreshold (e.g., 0.85)minFramesForMatchsilenceThreshold (e.g., -35.0)git clone https://github.com/your-repo/VoiceTrigger.git
cd VoiceTrigger
# Windows
gradlew.bat build
# Linux/macOS
./gradlew build
Build artifacts are located in build/libs/.
# Launch client
gradlew.bat runClient
# Launch server
gradlew.bat runServer
gradlew.bat runData
| Component | Description |
|---|---|
VoiceListener | Real-time voice listener handling microphone input and speech matching |
VoiceRecorder | Voice recorder for capturing user voice templates |
VoiceProfileManager | Manages storage and loading of WAV files |
AudioSimilarityDL | Deep learning audio similarity calculation based on Wav2Vec2 model |
Voice templates are stored in: .minecraft/config/voice_trigger/*.wav
File naming format: {key_name}.wav
| Key | Function |
|---|---|
B | Opens voice binding interface |
V | Voice monitoring (only when continuousMonitoring=OFF) |
logs/latest.log for error messagessimilarityThreshold valuesimilarityThreshold valuesilenceThreshold to filter background noiseLicensed under GNU Lesser General Public License v3.0.
