Voice Enrich

July 16, 2026 ยท View on GitHub

License Docs Hooks

MindRoom Logo

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

  1. MindRoom transcribes an incoming voice message and prefixes the visible body with ๐ŸŽค .
  2. On message:enrich, the voice-enrich hook checks whether the incoming body starts with VOICE_PREFIX.
  3. If it does, the hook adds a volatile voice_transcription metadata note to the prompt context.
  4. The agent sees the note during reasoning, but the Matrix message body shown to the user stays unchanged.

Hooks

HookEventPurpose
voice-enrichmessage:enrichAdd 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

  1. Copy this plugin to ~/.mindroom/plugins/voice-enrich.
  2. Add the plugin to config.yaml:
    plugins:
      - path: plugins/voice-enrich
    
  3. Restart MindRoom.

No agent tools or plugin settings are required. This plugin is hooks-only.