Voice Enrich
July 16, 2026 ยท View on GitHub
AI-only enrichment for MindRoom voice messages.
When a transcribed voice message arrives, this plugin silently injects a note into the agent prompt explaining that the text came from speech recognition and may contain transcription mistakes. The user-facing Matrix event body is never modified.
Features
- Detects voice-origin messages using
mindroom.constants.VOICE_PREFIX(๐ค) - Injects AI-only metadata via
MessageEnrichContext.add_metadata - Warns about common speech-to-text failure modes such as homophones, proper nouns, and rare technical terms
- Suggests re-transcribing the original audio attachment when the transcript looks garbled
- Zero-config, hooks-only behavior
- Lightweight execution with no network or file I/O in the hook path
How It Works
- MindRoom transcribes an incoming voice message and prefixes the visible body with
๐ค. - On
message:enrich, thevoice-enrichhook checks whether the incoming body starts withVOICE_PREFIX. - If it does, the hook adds a volatile
voice_transcriptionmetadata note to the prompt context. - The agent sees the note during reasoning, but the Matrix message body shown to the user stays unchanged.
Hooks
| Hook | Event | Purpose |
|---|---|---|
voice-enrich | message:enrich | Add voice transcription guidance when the message body starts with ๐ค |
Install
Vendor this plugin with the MindRoom CLI:
mindroom plugins install voice-enrich-plugin
Then reference it from config.yaml:
plugins:
- path: plugins/voice-enrich-plugin
Update to the latest commit later with:
mindroom plugins update voice-enrich-plugin
The command pins the exact installed commit in .mindroom-plugin.lock.json and strictly validates the plugin before activating it.
For a manual checkout instead, see Setup below.
Setup
- Copy this plugin to
~/.mindroom/plugins/voice-enrich. - Add the plugin to
config.yaml:plugins: - path: plugins/voice-enrich - Restart MindRoom.
No agent tools or plugin settings are required. This plugin is hooks-only.