Conversation
systemTTSEngine.Speak appended chat text as the last espeak-ng argument with no --. A reply that starts with - is parsed as an option, so Speak fails or writes or reads a file. Insert -- before the utterance so espeak treats it as words. Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 7, 2026, 5:01 PM ET / 21:01 UTC. ClawSweeper reviewWhat this changesThe PR separates spoken text from espeak command-line options with Merge readiness⛔ Blocked before merge - 3 items remain The fix remains necessary on main and addresses a distinct problem from the linked timeout and reconnect PRs. No blocking code defect was found, but the supplied simulated parser and argument recorder do not establish real espeak-ng behavior. Priority: P2 Review scores
Verification
How this fits togetherClawgo receives chat responses from the gateway and queues them for local speech. Its system TTS adapter launches espeak-ng with configured voice and rate settings followed by the response text. flowchart LR
A[Gateway chat response] --> B[Chat subscriber]
B --> C[Speech queue]
D[Voice and rate settings] --> E[System speech adapter]
C --> E
E --> F[Separate options from text]
F --> G[espeak-ng audio output]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the option separator, demonstrate real espeak-ng synthesis, and document and verify the espeak-compatible argument contract for custom commands. Do we have a high-confidence way to reproduce the issue? Yes, source establishes a concrete path: a leading-dash chat response reaches espeak-ng's option parser as an unseparated argument on main. No runtime reproduction or tests were executed during this read-only review. Is this the best way to solve the issue? Yes for the documented espeak-ng backend: ending option parsing is a narrow repair that preserves voice and rate settings. Custom-command compatibility still needs confirmation. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against c6e46796a1c8. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What Problem This Solves
Default
clawgo run(-chat-subscribe true,-tts-engine system) speaks chatfinaltext throughsystemTTSEngine.Speak. That function builtespeak-ng -v … -s … <text>and passed the utterance as the last argv with no--and no stdin.espeak-ngis[options] [words]. A reply that starts with-(a markdown list,-w/tmp/x,-fpath) is parsed as flags. Speak then fails, or the child writes or reads a file, instead of speaking the words.This is separate from #10, which only adds a Speak deadline. That branch still appends the raw text.
Evidence
Live
go runof the old argv shape versus the same shape with--before the utterance. Parser is espeak-style: a leading-tokenis an option unless a prior--ended option parsing, and-wPATHtakes the rest of the token as the file operand.Without
--,-w/tmp/xis optionwwith path/tmp/xand there are no words to speak. With--,-w/tmp/xstays inwords.The same argv is what production
Speaknow execs. A recorder child printed the slice after this patch:Real behavior proof
-is spoken as words. It is no longer parsed as an espeak-ng option.fix/tts-leading-dash-argvatC:\Users\sebta\AppData\Local\Temp\oc-audit-clawgo.go run C:\Users\sebta\AppData\Local\Temp\clawgo-f006-argv.gofor the old versus new argv parse. Then invoked productionsystemTTSEngine.Speakwith a recorder child so the process argv could be printed.go runhelper above, plus the recorder argv slices. After the patch,--sits immediately before the utterance.-w/tmp/xis inwords, not optionw.-w/tmp/xand- itemas words. The old argv treats them as-w/ a one-character flag and speaks nothing.espeak-ngbinary on this host, and custom-tts-system-commandwrappers that reject POSIX--.Summary
Call chain: chat
final->ChatSubscriber.speak->TTSQueue.Speak->systemTTSEngine.Speak->exec.Command(espeak-ng, -v, …, -s, …, text).Fix: insert
--before the utterance so the text cannot be parsed as flags. Least behavior change versus--stdin.Introduced in
f601408(2026-01-04, 246 days). Still present after thec6e4679rewrite in #8.Related work:
CommandContext. It does not insert--.[options] [words].-w <file>writes a WAV. POSIX--ends options.--as the end of options, after which remaining argv are operands.