openclaw - 💡(How to fix) Fix Bug: Audio preflight transcription not triggering in mention-gated Telegram groups [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#56124Fetched 2026-04-08 01:44:39
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

Fix Action

Workaround

Set requireMention: false for the group, or always include @botname in text caption alongside the voice note.

Code Example

{"module":"telegram-auto-reply", "chatId":-5240848412, "reason":"no-mention", "skipping group message"}

---

"tools": {
  "media": {
    "audio": {
      "enabled": true,
      "maxBytes": 20971520,
      "echoTranscript": true,
      "models": [{"provider": "openai", "model": "gpt-4o-mini-transcribe"}]
    }
  }
},
"channels": {
  "telegram": {
    "groups": {
      "-5XXXXXXXXX": {"requireMention": true}
    }
  }
}
RAW_BUFFERClick to expand / collapse

Environment

  • OpenClaw 2026.3.24 (stable)
  • macOS 26.4 (arm64), Node 25.8.2
  • Channel: Telegram group with requireMention: true
  • Audio config: tools.media.audio.enabled: true, model openai/gpt-4o-mini-transcribe

Expected behavior

Per docs (nodes/audio.md → "Mention Detection in Groups"), when requireMention: true, OpenClaw should perform preflight transcription on voice notes, check transcript for mentions, and proceed if found.

Actual behavior

Voice notes sent in mention-gated groups are immediately skipped with reason: "no-mention" — no preflight transcription occurs. Gateway logs show:

{"module":"telegram-auto-reply", "chatId":-5240848412, "reason":"no-mention", "skipping group message"}

No audio/transcription-related log entries appear at all. The agent receives <media:audio> placeholder instead of transcript.

Config (relevant)

"tools": {
  "media": {
    "audio": {
      "enabled": true,
      "maxBytes": 20971520,
      "echoTranscript": true,
      "models": [{"provider": "openai", "model": "gpt-4o-mini-transcribe"}]
    }
  }
},
"channels": {
  "telegram": {
    "groups": {
      "-5XXXXXXXXX": {"requireMention": true}
    }
  }
}

Steps to reproduce

  1. Configure tools.media.audio with a valid OpenAI transcription model
  2. Have a Telegram group with requireMention: true
  3. Send a voice note in that group (with or without mentioning the bot name in speech)
  4. Message is skipped without transcription attempt — reason: "no-mention" in logs
  5. No preflight transcription log entries

Workaround

Set requireMention: false for the group, or always include @botname in text caption alongside the voice note.

Additional context

  • Gateway was restarted after adding audio config
  • Logs confirm config reload: config change applied (dynamic reads: tools.media)
  • The issue appears to be that the mention check happens before the audio preflight transcription step, contrary to what the documentation describes

extent analysis

Fix Plan

To resolve the issue, we need to modify the code to perform preflight transcription before checking for mentions.

Here are the steps:

  • Update the telegram-auto-reply module to handle voice notes with requireMention: true by adding a preflight transcription step.
  • Modify the processMessage function to check if the message is a voice note and if requireMention is true. If so, perform preflight transcription using the configured OpenAI model.
  • After transcription, check the transcript for mentions and proceed if found.

Example code snippet:

// In telegram-auto-reply module
const processMessage = async (message) => {
  if (message.isVoiceNote && requireMention) {
    const transcript = await transcribeAudio(message.audio);
    if (transcript.includes(botName)) {
      // Proceed with message processing
    } else {
      // Skip message with reason: "no-mention"
    }
  }
};

const transcribeAudio = async (audio) => {
  // Use OpenAI transcription model to transcribe audio
  const model = getOpenAIModel();
  const transcript = await model.transcribe(audio);
  return transcript;
};

Verification

To verify the fix, follow these steps:

  • Send a voice note in a group with requireMention: true.
  • Check the logs for preflight transcription log entries.
  • Verify that the message is not skipped if the transcript contains a mention of the bot name.

Extra Tips

  • Ensure that the OpenAI transcription model is correctly configured and enabled.
  • Test the fix with different voice notes and mentions to ensure it works as expected.
  • Consider adding additional logging to track preflight transcription attempts and results.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Per docs (nodes/audio.md → "Mention Detection in Groups"), when requireMention: true, OpenClaw should perform preflight transcription on voice notes, check transcript for mentions, and proceed if found.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING