Skip empty sherpa structured transcripts#84667
Conversation
|
Codex review: passed. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Source inspection on current main shows empty sherpa structured JSON misses extraction, falls back to raw stdout, and remains non-empty before Discord voice can skip empty transcripts; I did not run a live Discord reproduction in this read-only review. PR rating What the crustacean ranks mean
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land this shared CLI media-understanding parser fix after exact-head CI/automerge gates, and leave broader voice queue-depth or stale-segment policy as a separate follow-up if maintainers want that resilience work. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows empty sherpa structured JSON misses extraction, falls back to raw stdout, and remains non-empty before Discord voice can skip empty transcripts; I did not run a live Discord reproduction in this read-only review. Is this the best way to solve the issue? Yes. Updating the shared sherpa CLI output normalization before Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against c0312748c4f7. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Pearl Signal Puff Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
Pushed What changed:
Local validation:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged current Conflict resolution:
Post-merge local validation:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper automerge |
|
🦞🧹
Draft PRs stay fix-only until GitHub marks them ready for review. Pause with Automerge progress:
|
521a6cd to
9d131a6
Compare
9d131a6 to
ac03171
Compare
Summary: - The PR changes sherpa-onnx CLI audio parsing so structured JSON with an empty `text` field becomes no transcript, while preserving non-empty JSON extraction and adding direct plus auto-detect regression coverage. - Reproducibility: yes. Source inspection on current main shows empty sherpa structured JSON misses extraction ... scord voice can skip empty transcripts; I did not run a live Discord reproduction in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: Fix stale CI guardrails for sherpa transcript PR - PR branch already contained follow-up commit before automerge: Skip empty sherpa structured transcripts Validation: - ClawSweeper review passed for head ac03171. - Required merge gates passed before the squash merge. Prepared head SHA: ac03171 Review: openclaw#84667 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR changes sherpa-onnx CLI audio parsing so structured JSON with an empty `text` field becomes no transcript, while preserving non-empty JSON extraction and adding direct plus auto-detect regression coverage. - Reproducibility: yes. Source inspection on current main shows empty sherpa structured JSON misses extraction ... scord voice can skip empty transcripts; I did not run a live Discord reproduction in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: Fix stale CI guardrails for sherpa transcript PR - PR branch already contained follow-up commit before automerge: Skip empty sherpa structured transcripts Validation: - ClawSweeper review passed for head ac03171. - Required merge gates passed before the squash merge. Prepared head SHA: ac03171 Review: openclaw#84667 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR changes sherpa-onnx CLI audio parsing so structured JSON with an empty `text` field becomes no transcript, while preserving non-empty JSON extraction and adding direct plus auto-detect regression coverage. - Reproducibility: yes. Source inspection on current main shows empty sherpa structured JSON misses extraction ... scord voice can skip empty transcripts; I did not run a live Discord reproduction in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: Fix stale CI guardrails for sherpa transcript PR - PR branch already contained follow-up commit before automerge: Skip empty sherpa structured transcripts Validation: - ClawSweeper review passed for head ac03171. - Required merge gates passed before the squash merge. Prepared head SHA: ac03171 Review: openclaw#84667 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR changes sherpa-onnx CLI audio parsing so structured JSON with an empty `text` field becomes no transcript, while preserving non-empty JSON extraction and adding direct plus auto-detect regression coverage. - Reproducibility: yes. Source inspection on current main shows empty sherpa structured JSON misses extraction ... scord voice can skip empty transcripts; I did not run a live Discord reproduction in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: Fix stale CI guardrails for sherpa transcript PR - PR branch already contained follow-up commit before automerge: Skip empty sherpa structured transcripts Validation: - ClawSweeper review passed for head ac03171. - Required merge gates passed before the squash merge. Prepared head SHA: ac03171 Review: openclaw#84667 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR changes sherpa-onnx CLI audio parsing so structured JSON with an empty `text` field becomes no transcript, while preserving non-empty JSON extraction and adding direct plus auto-detect regression coverage. - Reproducibility: yes. Source inspection on current main shows empty sherpa structured JSON misses extraction ... scord voice can skip empty transcripts; I did not run a live Discord reproduction in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: Fix stale CI guardrails for sherpa transcript PR - PR branch already contained follow-up commit before automerge: Skip empty sherpa structured transcripts Validation: - ClawSweeper review passed for head ac03171. - Required merge gates passed before the squash merge. Prepared head SHA: ac03171 Review: openclaw#84667 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR changes sherpa-onnx CLI audio parsing so structured JSON with an empty `text` field becomes no transcript, while preserving non-empty JSON extraction and adding direct plus auto-detect regression coverage. - Reproducibility: yes. Source inspection on current main shows empty sherpa structured JSON misses extraction ... scord voice can skip empty transcripts; I did not run a live Discord reproduction in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: Fix stale CI guardrails for sherpa transcript PR - PR branch already contained follow-up commit before automerge: Skip empty sherpa structured transcripts Validation: - ClawSweeper review passed for head ac03171. - Required merge gates passed before the squash merge. Prepared head SHA: ac03171 Review: openclaw#84667 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR changes sherpa-onnx CLI audio parsing so structured JSON with an empty `text` field becomes no transcript, while preserving non-empty JSON extraction and adding direct plus auto-detect regression coverage. - Reproducibility: yes. Source inspection on current main shows empty sherpa structured JSON misses extraction ... scord voice can skip empty transcripts; I did not run a live Discord reproduction in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: Fix stale CI guardrails for sherpa transcript PR - PR branch already contained follow-up commit before automerge: Skip empty sherpa structured transcripts Validation: - ClawSweeper review passed for head ac03171. - Required merge gates passed before the squash merge. Prepared head SHA: ac03171 Review: openclaw#84667 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR changes sherpa-onnx CLI audio parsing so structured JSON with an empty `text` field becomes no transcript, while preserving non-empty JSON extraction and adding direct plus auto-detect regression coverage. - Reproducibility: yes. Source inspection on current main shows empty sherpa structured JSON misses extraction ... scord voice can skip empty transcripts; I did not run a live Discord reproduction in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: Fix stale CI guardrails for sherpa transcript PR - PR branch already contained follow-up commit before automerge: Skip empty sherpa structured transcripts Validation: - ClawSweeper review passed for head ac03171. - Required merge gates passed before the squash merge. Prepared head SHA: ac03171 Review: openclaw#84667 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR changes sherpa-onnx CLI audio parsing so structured JSON with an empty `text` field becomes no transcript, while preserving non-empty JSON extraction and adding direct plus auto-detect regression coverage. - Reproducibility: yes. Source inspection on current main shows empty sherpa structured JSON misses extraction ... scord voice can skip empty transcripts; I did not run a live Discord reproduction in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: Fix stale CI guardrails for sherpa transcript PR - PR branch already contained follow-up commit before automerge: Skip empty sherpa structured transcripts Validation: - ClawSweeper review passed for head ac03171. - Required merge gates passed before the squash merge. Prepared head SHA: ac03171 Review: openclaw#84667 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR changes sherpa-onnx CLI audio parsing so structured JSON with an empty `text` field becomes no transcript, while preserving non-empty JSON extraction and adding direct plus auto-detect regression coverage. - Reproducibility: yes. Source inspection on current main shows empty sherpa structured JSON misses extraction ... scord voice can skip empty transcripts; I did not run a live Discord reproduction in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: Fix stale CI guardrails for sherpa transcript PR - PR branch already contained follow-up commit before automerge: Skip empty sherpa structured transcripts Validation: - ClawSweeper review passed for head ac03171. - Required merge gates passed before the squash merge. Prepared head SHA: ac03171 Review: openclaw#84667 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR changes sherpa-onnx CLI audio parsing so structured JSON with an empty `text` field becomes no transcript, while preserving non-empty JSON extraction and adding direct plus auto-detect regression coverage. - Reproducibility: yes. Source inspection on current main shows empty sherpa structured JSON misses extraction ... scord voice can skip empty transcripts; I did not run a live Discord reproduction in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: Fix stale CI guardrails for sherpa transcript PR - PR branch already contained follow-up commit before automerge: Skip empty sherpa structured transcripts Validation: - ClawSweeper review passed for head ac03171. - Required merge gates passed before the squash merge. Prepared head SHA: ac03171 Review: openclaw#84667 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary
sherpa-onnx-offlineJSON with an emptytextfield as an empty transcript instead of falling back to raw stdout.Closes #84660.
Real behavior proof
Behavior or issue addressed:
Moonshine/sherpa can emit a structured JSON object where
textis empty. Before this patch, OpenClaw treated that as unrecognized sherpa output, fell back to the raw JSON string, and could pass that JSON to the LLM as a voice transcript.Real environment tested:
Local macOS worktree with bundled Node.js
v24.14.0, repository dependencies, and a fake executable namedsherpa-onnx-offlineinvoked through the real CLI media runner.Exact steps or command run after this patch:
Evidence after fix:
The standalone runtime proof invokes the real
runCliEntry()path with a fakesherpa-onnx-offlinebinary. Empty structured JSON no longer returns a transcript, while non-empty structured JSON still extracts normally:{ "emptySherpaJsonReturnedTranscript": false, "emptySherpaJsonText": null, "nonEmptySherpaJsonText": "hello from sherpa", "nonEmptySherpaJsonKind": "audio.transcription" }Targeted tests:
Observed result after fix:
Empty sherpa/moonshine JSON is skipped before it can become
ctx.Transcriptor anaudio.transcriptionoutput, so the serialized Discord voice lane will not enqueue an agent turn for that empty segment. Non-empty sherpa JSON remains accepted.What was not tested:
I did not run a live Discord voice session or the full repository test suite. The proof uses the real media CLI runner with a fake sherpa executable and targeted media-understanding tests for the affected normalization and auto-detect paths.
Attribution
If this PR is squashed or reworked, please preserve the commit author attribution for Andy Ye 35905412+TurboTheTurtle@users.noreply.github.com, or include:
Co-authored-by: Andy Ye 35905412+TurboTheTurtle@users.noreply.github.com