openclaw - ✅(Solved) Fix TTS tool: returns (spoken) but doesn't send voice message to Telegram [2 pull requests, 1 comments, 2 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#74752Fetched 2026-05-01 05:41:46
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
2
Timeline (top)
cross-referenced ×2commented ×1

Fix Action

Workaround

Using direct OGG file sending with asVoice: true via the message tool works perfectly:

{
  "action": "send",
  "channel": "telegram",
  "to": "5985720862",
  "media": "/tmp/test-tts.ogg",
  "asVoice": true
}

PR fix notes

PR #74901: fix(tts): respect trustedLocalMedia flag to unblock voice delivery when tts is absent from builtinToolNames

Description (problem / solution / changelog)

Summary

The TTS tool was silently delivering a text message ("(spoken) …") instead of the audio voice note, because the local OGG file path was filtered out before reaching the Telegram send path.

Root cause: filterToolResultMediaUrls only allowed local paths when builtinToolNames.has(toolName) was true. When builtinToolNames was defined but did not contain "tts" (configuration-dependent), the /tmp/…ogg path was filtered to an empty array and delivery silently fell through to text only.

Fix: The TTS tool already sets details.media.trustedLocalMedia: true to signal the local audio path is safe for delivery. Added a check for this flag that bypasses the builtinToolNames name-registration gate — matching the intended semantics of trustedLocalMedia.

No behavioral change when builtinToolNames is undefined or already contains "tts".

Closes #74752

🤖 Generated with Claude Code

Changed files

  • src/agents/pi-embedded-subscribe.tools.ts (modified, +14/-3)

PR #74920: Fix gateway recovery diagnostics and media delivery regressions

Description (problem / solution / changelog)

Summary

  • add service-layout diagnostics for status/doctor so service entrypoints, realpaths, package roots, source-checkout installs, and systemd scope are visible
  • make Linux update restarts detect system-scoped units and return exact sudo restart guidance instead of silently falling through the user-unit path
  • classify onboarding gateway health failures into actionable recovery paths instead of surfacing raw connection errors
  • propagate asVoice / audioAsVoice through message send actions and outbound delivery
  • avoid importing bundled sqlite-vec when an explicit extension path is configured
  • keep task maintenance on the lightweight session chat-type parser

Safety / duplicate sweep

  • Related gateway/systemd threads: #62557, #74047, #74597, #41914, #31414, #57188; related open PR #57276 overlaps on system-scoped systemd handling, but this PR is narrower around update restart guidance and diagnostics.
  • Related TTS/media threads: #74752, #73448, #73758, #73145; older duplicate candidates found by gitcrawl include #66092, #55303, #56638 and closed unmerged PRs #42075/#42294.
  • Related memory/vector threads: #74692 plus platform/ABI follow-ups like #65244 and #65704; this PR only handles the explicit extension-path short-circuit.
  • No prtags duplicate write was made: the PR is a multi-bucket recovery patch, and the related threads are not one coherent duplicate cluster.

Tests

  • pnpm docs:list
  • pnpm test src/cli/update-cli/restart-helper.test.ts src/infra/update-global.test.ts src/infra/outbound/message.test.ts src/infra/outbound/message-action-runner.media.test.ts src/tasks/task-boundaries.test.ts packages/memory-host-sdk/src/host/sqlite-vec.test.ts src/commands/onboard-non-interactive.gateway.test.ts src/commands/status.service-summary.test.ts src/commands/status.daemon.test.ts src/commands/doctor-gateway-services.test.ts -- --reporter=verbose
  • pnpm exec oxfmt --check --threads=1 packages/memory-host-sdk/src/host/sqlite-vec.ts packages/memory-host-sdk/src/host/sqlite-vec.test.ts src/cli/update-cli/restart-helper.test.ts src/cli/update-cli/restart-helper.ts src/commands/doctor-gateway-services.test.ts src/commands/doctor-gateway-services.ts src/commands/onboard-non-interactive.gateway.test.ts src/commands/onboard-non-interactive/local/output.ts src/commands/status.daemon.test.ts src/commands/status.daemon.ts src/commands/status.service-summary.test.ts src/commands/status.service-summary.ts src/daemon/service-layout.ts src/infra/outbound/message-action-runner.media.test.ts src/infra/outbound/message-action-runner.ts src/infra/outbound/message.test.ts src/infra/outbound/message.ts src/infra/outbound/outbound-send-service.ts src/infra/update-global.test.ts src/infra/update-global.ts src/tasks/task-boundaries.test.ts src/tasks/task-registry.maintenance.ts
  • git diff --check
  • OPENCLAW_TESTBOX=1 pnpm check:changed in Blacksmith Testbox after dependency install refresh

Changed files

  • apps/macos/Sources/OpenClawProtocol/GatewayModels.swift (modified, +4/-0)
  • apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift (modified, +4/-0)
  • packages/memory-host-sdk/src/host/sqlite-vec.test.ts (added, +25/-0)
  • packages/memory-host-sdk/src/host/sqlite-vec.ts (modified, +5/-6)
  • src/cli/update-cli/restart-helper.test.ts (modified, +39/-0)
  • src/cli/update-cli/restart-helper.ts (modified, +21/-5)
  • src/commands/doctor-gateway-services.test.ts (modified, +35/-0)
  • src/commands/doctor-gateway-services.ts (modified, +11/-0)
  • src/commands/onboard-non-interactive.gateway.test.ts (modified, +29/-0)
  • src/commands/onboard-non-interactive/local/output.ts (modified, +81/-1)
  • src/commands/status.daemon.test.ts (added, +48/-0)
  • src/commands/status.daemon.ts (modified, +2/-0)
  • src/commands/status.service-summary.test.ts (modified, +46/-0)
  • src/commands/status.service-summary.ts (modified, +7/-0)
  • src/daemon/service-layout.ts (added, +141/-0)
  • src/gateway/protocol/schema/agent.ts (modified, +1/-0)
  • src/gateway/server-methods/send.test.ts (modified, +31/-0)
  • src/gateway/server-methods/send.ts (modified, +9/-1)
  • src/infra/outbound/message-action-runner.media.test.ts (modified, +30/-0)
  • src/infra/outbound/message-action-runner.ts (modified, +6/-0)
  • src/infra/outbound/message.test.ts (modified, +23/-0)
  • src/infra/outbound/message.ts (modified, +3/-0)
  • src/infra/outbound/outbound-send-service.ts (modified, +2/-0)
  • src/infra/update-global.test.ts (modified, +20/-0)
  • src/infra/update-global.ts (modified, +13/-0)
  • src/tasks/task-boundaries.test.ts (modified, +9/-0)
  • src/tasks/task-registry.maintenance.ts (modified, +2/-2)

Code Example

{
    "auto": "always",
    "provider": "microsoft",
    "providers": {
      "microsoft": {
        "enabled": true,
        "voice": "zh-CN-XiaoxiaoNeural",
        "lang": "zh-CN",
        "outputFormat": "ogg-24khz-16bit-mono-opus"
      }
    }
  }

---

{
  "action": "send",
  "channel": "telegram",
  "to": "5985720862",
  "media": "/tmp/test-tts.ogg",
  "asVoice": true
}
RAW_BUFFERClick to expand / collapse

Bug Description

TTS tool returns "(spoken)" but doesn't send voice message to Telegram - text is sent instead

Environment

  • OpenClaw version: 2026.4.27 (cbc2ba0)
  • Node.js: v24.14.1
  • Platform: Linux (Ubuntu)
  • Channel: Telegram
  • TTS Config:
    {
      "auto": "always",
      "provider": "microsoft",
      "providers": {
        "microsoft": {
          "enabled": true,
          "voice": "zh-CN-XiaoxiaoNeural",
          "lang": "zh-CN",
          "outputFormat": "ogg-24khz-16bit-mono-opus"
        }
      }
    }

Steps to Reproduce

  1. Configure TTS with Microsoft provider (auto: "always")
  2. Call the TTS tool with some text
  3. Observe that "(spoken)" is returned in the tool result
  4. User receives regular text message instead of voice message

Expected Behavior

Audio should be sent automatically as a voice message to Telegram when TTS tool is called.

Actual Behavior

  • Tool returns "(spoken)" indicating audio was generated
  • Text message is sent to Telegram instead of voice
  • No voice message received by user

Workaround

Using direct OGG file sending with asVoice: true via the message tool works perfectly:

{
  "action": "send",
  "channel": "telegram",
  "to": "5985720862",
  "media": "/tmp/test-tts.ogg",
  "asVoice": true
}

Additional Context

  • Direct OGG file sending with asVoice: true works perfectly (user confirmed)
  • TTS audio generation works (verified via node-edge-tts CLI)
  • Issue is specifically with TTS tool not delivering audio to Telegram channel
  • The tool documentation says "Audio is delivered automatically from the tool result" but this is not happening

Note: I am an OpenClaw user (not a developer). Feel free to close if this is expected behavior or if I am misusing the tool.

extent analysis

TL;DR

The TTS tool is not sending the generated audio as a voice message to Telegram, despite returning "(spoken)" and the direct OGG file sending working with asVoice: true.

Guidance

  • Verify that the asVoice parameter is being set to true when sending the TTS-generated audio to Telegram, as this is required for voice messages.
  • Check the TTS tool's implementation to ensure it is correctly handling the asVoice parameter and sending the audio as a voice message.
  • Compare the working direct OGG file sending example with the TTS tool's implementation to identify any differences in how the audio is being sent.
  • Review the tool documentation to see if there are any specific requirements or configurations needed for automatic audio delivery.

Example

No code example is provided as the issue is more related to the tool's configuration and implementation.

Notes

The issue seems to be specific to the TTS tool's integration with Telegram, and the fact that direct OGG file sending works with asVoice: true suggests that the problem lies in how the TTS tool is handling the audio delivery.

Recommendation

Apply workaround: use direct OGG file sending with asVoice: true via the message tool, as this has been confirmed to work perfectly. This will ensure that voice messages are delivered correctly until the TTS tool's issue is resolved.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING