Skip to content

Fix speech input test native VAD crash - #686

Merged
ranjeshj merged 1 commit into
openclaw:masterfrom
christineyan4:fix-683-speech-input-crash
Jun 4, 2026
Merged

ranjeshj merged 1 commit into
openclaw:masterfrom
christineyan4:fix-683-speech-input-crash

Conversation

@christineyan4

@christineyan4 christineyan4 commented Jun 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #683.

This removes the unused native Silero/ONNX VAD startup path from the tray speech input flow. The live AudioPipeline already uses managed RMS/energy VAD, so VoiceService no longer downloads/loads the native VAD model before starting microphone capture. AudioPipeline keeps the same 16 kHz / 512-sample chunk behavior through local constants instead of referencing VoiceActivityDetector.

Repro validation

A/B validation was performed with the old runtime conditions from the crash report:

  • A / repro: v0.6.0 portable x64 with app-local msvcp140.dll 14.29.30142.1 reproduced the Speech Input Test crash.
  • B / fix: fix-683-speech-input-crash Release x64 portable using the same old app-local msvcp140.dll 14.29.30142.1 and copied gateway/model state did not crash on the same Speech Input Test flow.

This validates the fix under the reproduced crash conditions, though it does not identify the exact native faulting instruction.

Tests

  • ./build.ps1
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore — 2045 passed, 29 skipped
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore — 936 passed

Review

Ran a Hanselman-style dual-model review. No blocking findings. The only shared note was low-severity source-contract test fragility, consistent with existing WinUI contract-test patterns in this repo.

Evidence

Video proof: attached in PR comment

Avoid loading the unused native Silero VAD during tray speech input startup so the Record test path no longer enters the native ONNX dependency before microphone capture. Keep the existing managed energy VAD behavior in AudioPipeline and add a source contract test.

Co-authored-by: Copilot <[email protected]>
@clawsweeper

clawsweeper Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed June 4, 2026, 12:25 PM ET / 16:25 UTC.

Summary
The PR removes native Silero/ONNX VAD startup from tray speech input, keeps managed energy VAD timing in AudioPipeline, and adds tray source contract tests.

Reproducibility: yes. for source-level review: the linked crash path starts speech input, and current main enters native Silero VAD loading before capture. I did not run the Windows crash locally in this read-only Linux review.

Review metrics: 1 noteworthy metric.

  • Patch surface: 3 files changed, 59 additions, 122 deletions. The fix is a small bounded removal of unused startup code plus targeted contract coverage.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • No ClawSweeper repair lane is needed because the patch has no actionable findings and already includes behavior proof.

Security
Cleared: The diff removes a native model download/load path and adds no new dependency, credential, CI, or code-execution surface.

Review details

Best possible solution:

Land the narrow removal of native VAD startup for speech input while preserving the existing managed energy VAD behavior and required tray validation.

Do we have a high-confidence way to reproduce the issue?

Yes for source-level review: the linked crash path starts speech input, and current main enters native Silero VAD loading before capture. I did not run the Windows crash locally in this read-only Linux review.

Is this the best way to solve the issue?

Yes; removing the unused native detector from startup is the narrowest maintainable fix because AudioPipeline already performs managed RMS/energy VAD and only used the native class for constants.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 85445c78066b.

Label changes

Label changes:

  • add P2: The PR addresses a reproducible crash in a visible tray speech input workflow with limited code surface.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body gives A/B crash validation, and the attached recording shows the after-fix speech input test running to Done without the app crashing.
  • add proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR body gives A/B crash validation, and the attached recording shows the after-fix speech input test running to Done without the app crashing.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): The PR body gives A/B crash validation, and the attached recording shows the after-fix speech input test running to Done without the app crashing.

Label justifications:

  • P2: The PR addresses a reproducible crash in a visible tray speech input workflow with limited code surface.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): The PR body gives A/B crash validation, and the attached recording shows the after-fix speech input test running to Done without the app crashing.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body gives A/B crash validation, and the attached recording shows the after-fix speech input test running to Done without the app crashing.
  • proof: 🎥 video: Contributor real behavior proof includes video or recording evidence. The PR body gives A/B crash validation, and the attached recording shows the after-fix speech input test running to Done without the app crashing.
Evidence reviewed

What I checked:

  • Current main enters native VAD startup: Current VoiceService constructs VoiceActivityDetector, downloads or finds the Silero ONNX model during InitializeAsync, and loads it before speech capture paths create AudioPipeline. (src/OpenClaw.Tray.WinUI/Services/VoiceService.cs:109, 85445c78066b)
  • PR removes the unused native VAD path: The PR patch removes the detector field, model lookup/download/load helpers, and constructor argument, while replacing detector constants with local 16 kHz and 512-sample constants. (src/OpenClaw.Tray.WinUI/Services/AudioPipeline.cs:38, 8086ee6122f4)
  • Proof recording inspected: The attached 14.6 second MP4 shows the Voice & Audio page with model ready, recording active, and the app returning to Done/Record without closing or crashing.
  • Feature provenance: git blame attributes the current native VAD initialization, AudioPipeline detector constructor, and Silero download helper to commit 7d9152f, the v0.6.0 release commit referenced by the crash report. (src/OpenClaw.Tray.WinUI/Services/VoiceService.cs:109, 7d9152f427a3)
  • Repository policy read: The target AGENTS.md was read fully; its validation requirements match the PR body's reported build, shared test, and tray test commands. (AGENTS.md:1, 85445c78066b)

Likely related people:

  • Régis Brid: git blame shows the current native VAD startup, AudioPipeline detector constructor, and Silero model helper all date to commit 7d9152f. (role: introduced current voice path; confidence: high; commits: 7d9152f427a3; files: src/OpenClaw.Tray.WinUI/Services/VoiceService.cs, src/OpenClaw.Tray.WinUI/Services/AudioPipeline.cs, src/OpenClaw.Shared/Audio/VoiceActivityDetector.cs)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@christineyan4

Copy link
Copy Markdown
Contributor Author
Screen.Recording.2026-06-04.120159.mp4

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal priority bug or improvement with limited blast radius. labels Jun 4, 2026
@ranjeshj
ranjeshj merged commit 99efc50 into openclaw:master Jun 4, 2026
31 checks passed
RBrid added a commit to RBrid/openclaw-windows-node that referenced this pull request Jun 4, 2026
Resolves conflicts between PR openclaw#624 (localize remaining tray strings) and the
PR openclaw#558 / PR openclaw#597 / openclaw#686 localization work landed in master.

Conflict resolutions
- 6 XAML files (AgentEventsPage, ConnectionPage, CronPage, SandboxPage,
  SessionsPage, HubWindow): took master versions
- CronPage.xaml.cs: master + re-applied 2 openclaw#624 hunks (JobCompletedInfoBar,
  ShowDisconnected)
- 5 Resources.resw files: reset to master and re-injected 80 unique openclaw#624 keys
  via text injection so XML entities (&quot;) are preserved verbatim
- LocalizationValidationTests.cs: pruned 17 obsolete and 7 over-deferred
  entries from InvariantOrDeferredResourceKeys

Regression caught by adversarial review
- AgentEventsPage / SkillsPage runtime code overrides XAML defaults with
  LocalizationHelper.GetString / Format calls. The 7 corresponding keys were
  seeded English-only across all locales so fr/nl/zh users would have seen
  English status badges and skill counters at runtime
- Translated those 7 keys in fr-fr, nl-nl, zh-cn, zh-tw using the existing
  XAML translations as canonical source (28 strings total)
- nl-nl AgentEventsPage_Status_Offline = "Niet verbonden" (matches the
  Status == Connected runtime check) so the all-or-none parity test passes
- Stripped UTF-8 BOM from nl-nl/Resources.resw introduced by the rewrite so
  all 5 locales share the same encoding

Validation
- ./build.ps1 clean
- OpenClaw.Shared.Tests: 2045 passed / 29 skipped
- OpenClaw.Tray.Tests: 936 passed / 0 failed
- Key parity: 1885 entries per locale across all 5 locales

Co-authored-by: Copilot <[email protected]>
Ki-Will pushed a commit to Ki-Will/openclaw-windows-node that referenced this pull request Sep 24, 2026
Ki-Will pushed a commit to Ki-Will/openclaw-windows-node that referenced this pull request Sep 24, 2026
Ki-Will pushed a commit to Ki-Will/openclaw-windows-node that referenced this pull request Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Speech Input Test causes reproducible APPCRASH in OpenClaw.Tray.WinUI.exe

2 participants