惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 聂微东
Y
Y Combinator Blog
WordPress大学
WordPress大学
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
A
About on SuperTechFans
小众软件
小众软件
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
宝玉的分享
宝玉的分享
Recent Announcements
Recent Announcements
GbyAI
GbyAI
I
InfoQ
The GitHub Blog
The GitHub Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
罗磊的独立博客
C
Check Point Blog
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
量子位
雷峰网
雷峰网
Hugging Face - Blog
Hugging Face - Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: prevent discord voice self-feedback · openclaw/openc...
steipete · 2026-05-07 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -6,6 +6,7 @@ Docs: https://docs.openclaw.ai

66
77

### Changes

88
9+

- Discord/voice: keep TTS playback running when another user starts speaking, ignore new capture during playback to avoid feedback loops, and downgrade expected receive-stream aborts to verbose diagnostics.

910

- Telegram: treat successful same-chat `message` tool outbound sends during an inbound telegram turn as delivered when deciding whether to emit the rewritten silent reply fallback (#78685). Thanks @neeravmakwana.

1011

- Gateway/tasks: reconcile stale CLI run-context tasks whose live run context disappeared even when a child session row remains, and apply the default bounded reload deferral timeout to channel hot reloads so stale task records cannot block Discord/Slack/Telegram reloads forever.

1112

- Discord/voice: make `openclaw channels capabilities --channel discord --target channel:<id>` and `channels status --probe` audit voice-channel permissions, including auto-join targets, so missing Connect/Speak/Read Message History permissions show up before `/vc join`.

Original file line numberDiff line numberDiff line change

@@ -1205,8 +1205,10 @@ Notes:

12051205

- `@discordjs/voice` defaults are `daveEncryption=true` and `decryptionFailureTolerance=24` if unset.

12061206

- `voice.connectTimeoutMs` controls the initial `@discordjs/voice` Ready wait for `/vc join` and auto-join attempts. Default: `30000`.

12071207

- `voice.reconnectGraceMs` controls how long OpenClaw waits for a disconnected voice session to begin reconnecting before destroying it. Default: `15000`.

1208+

- Voice playback does not stop just because another user starts speaking. To avoid feedback loops, OpenClaw ignores new voice capture while TTS is playing; speak after playback finishes for the next turn.

12081209

- OpenClaw also watches receive decrypt failures and auto-recovers by leaving/rejoining the voice channel after repeated failures in a short window.

12091210

- If receive logs repeatedly show `DecryptionFailed(UnencryptedWhenPassthroughDisabled)` after updating, collect a dependency report and logs. The bundled `@discordjs/voice` line includes the upstream padding fix from discord.js PR #11449, which closed discord.js issue #11419.

1211+

- `The operation was aborted` receive events are expected when OpenClaw finalizes a captured speaker segment; they are verbose diagnostics, not warnings.

12101212
12111213

Voice channel pipeline:

12121214
Original file line numberDiff line numberDiff line change

@@ -351,6 +351,7 @@ WhatsApp runs through the gateway's web channel (Baileys Web). It starts automat

351351

- `channels.discord.voice.daveEncryption` and `channels.discord.voice.decryptionFailureTolerance` pass through to `@discordjs/voice` DAVE options (`true` and `24` by default).

352352

- `channels.discord.voice.connectTimeoutMs` controls the initial `@discordjs/voice` Ready wait for `/vc join` and auto-join attempts (`30000` by default).

353353

- `channels.discord.voice.reconnectGraceMs` controls how long a disconnected voice session may take to enter reconnect signalling before OpenClaw destroys it (`15000` by default).

354+

- Discord voice playback is not interrupted by another user's speaking-start event. To avoid feedback loops, OpenClaw ignores new voice capture while TTS is playing.

354355

- OpenClaw additionally attempts voice receive recovery by leaving/rejoining a voice session after repeated decrypt failures.

355356

- `channels.discord.streaming` is the canonical stream mode key. Discord defaults to `streaming.mode: "progress"` so tool/work progress appears in one edited preview message; set `streaming.mode: "off"` to disable it. Legacy `streamMode` and boolean `streaming` values remain runtime aliases; run `openclaw doctor --fix` to rewrite persisted config.

356357

- `channels.discord.autoPresence` maps runtime availability to bot presence (healthy => online, degraded => idle, exhausted => dnd) and allows optional status text overrides.

Original file line numberDiff line numberDiff line change

@@ -393,6 +393,29 @@ describe("DiscordVoiceManager", () => {

393393

expect(player.off).toHaveBeenCalledWith("error", expect.any(Function));

394394

});

395395
396+

it("ignores new capture while playback is running", async () => {

397+

const connection = createConnectionMock();

398+

joinVoiceChannelMock.mockReturnValueOnce(connection);

399+

const manager = createManager();

400+
401+

await manager.join({ guildId: "g1", channelId: "1001" });

402+
403+

const player = createAudioPlayerMock.mock.results.at(-1)?.value;

404+

const entry = (manager as unknown as { sessions: Map<string, unknown> }).sessions.get("g1");

405+

expect(entry).toBeDefined();

406+

expect(player).toBeDefined();

407+

player.state.status = "playing";

408+
409+

await (

410+

manager as unknown as {

411+

handleSpeakingStart: (entry: unknown, userId: string) => Promise<void>;

412+

}

413+

).handleSpeakingStart(entry, "u1");

414+
415+

expect(player.stop).not.toHaveBeenCalled();

416+

expect(connection.receiver.subscribe).not.toHaveBeenCalled();

417+

});

418+
396419

it("passes DAVE options to joinVoiceChannel", async () => {

397420

const manager = createManager({

398421

voice: {

Original file line numberDiff line numberDiff line change

@@ -496,15 +496,17 @@ export class DiscordVoiceManager {

496496

`capture start: guild ${entry.guildId} channel ${entry.channelId} user ${userId}`,

497497

);

498498

const voiceSdk = loadDiscordVoiceSdk();

499+

if (entry.player.state.status === voiceSdk.AudioPlayerStatus.Playing) {

500+

logVoiceVerbose(

501+

`capture ignored during playback: guild ${entry.guildId} channel ${entry.channelId} user ${userId}`,

502+

);

503+

return;

504+

}

499505

this.enableDaveReceivePassthrough(

500506

entry,

501507

`speaker ${userId} start`,

502508

DAVE_RECEIVE_PASSTHROUGH_REARM_EXPIRY_SECONDS,

503509

);

504-

if (entry.player.state.status === voiceSdk.AudioPlayerStatus.Playing) {

505-

entry.player.stop(true);

506-

}

507-
508510

const stream = entry.connection.receiver.subscribe(userId, {

509511

end: {

510512

behavior: voiceSdk.EndBehaviorType.Manual,

@@ -575,6 +577,10 @@ export class DiscordVoiceManager {

575577
576578

private handleReceiveError(entry: VoiceSessionEntry, err: unknown) {

577579

const analysis = analyzeVoiceReceiveError(err);

580+

if (analysis.isAbortLike && !analysis.countsAsDecryptFailure) {

581+

logVoiceVerbose(`receive stream ended: ${analysis.message}`);

582+

return;

583+

}

578584

logger.warn(`discord voice: receive error: ${analysis.message}`);

579585

if (analysis.shouldAttemptPassthrough) {

580586

this.enableDaveReceivePassthrough(