Repository navigation
fix(android): Talk keeps beeping without replying and ignores the stt-tts voice mode - #150175
Conversation
|
🦞👀 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 maintainer review before merge. Reviewed September 16, 2026, 5:24 PM ET / 21:24 UTC (Revision 3). ClawSweeper reviewWhat this changesAndroid Talk waits for speech recognition results before restarting and routes the configured stt-tts mode through native recognition, Gateway chat, and the configured speech provider. Merge readiness✅ Ready for maintainer review This PR remains necessary: current main retains both reported defects. The focused changes and contributor-provided device logs support the fix, and no blocking introduced defect was found. Priority: P1 Review scores
Verification
How this fits togetherAndroid Talk turns microphone input into an agent conversation and spoken replies. Gateway configuration selects between realtime audio relay and the existing native speech-to-text/chat/text-to-speech path. flowchart TD
A[Gateway Talk configuration] --> B{Selected voice mode}
B -->|Realtime eligible| C[Realtime audio relay]
B -->|stt-tts| D[Android speech recognition]
D --> E[Transcript after silence]
E --> F[Gateway agent chat]
F --> G[Configured speech synthesis]
G --> H[Spoken reply]
C --> H
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +47, Other 0. Total +47 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep recognition restart ownership with terminal callbacks and honor explicit stt-tts configuration through the existing native Talk pipeline. Do we have a high-confidence way to reproduce the issue? Yes: the current-main restart and mode-selection paths match the reported failures, with concrete device logs and focused regression cases supplied. This read-only review did not execute Android code. Is this the best way to solve the issue? Yes: the patch removes a premature restart and reuses the established native speech pipeline without adding configuration or changing the default realtime selection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against afc27e774fda. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
… mode Native Talk restarted the recognizer on onEndOfSpeech. Google's recognizer delivers the final hypothesis at end of speech and reports onResults only when the session closes, so the restart cancelled the session, and the cancel's ERROR_CLIENT cleared listening. checkSilence then skipped finalization, so Talk kept beeping without sending chat.send. onResults/onError already own the restart. Android also always used the gateway relay for Talk, ignoring talk.realtime.mode. gateway-relay carries only realtime sessions, so mode "stt-tts" now routes to native Talk (device STT, chat.send, talk.speak), which uses the configured Talk speech provider and voice. Fixes openclaw#150105 Fixes openclaw#150104 Co-Authored-By: Claude Opus 5 <[email protected]>
428474b to
1818eea
Compare
|
Final maintainer verification for
Thanks @guarismo for the fix and device verification. |
|
Merged via squash. Prepared head: 1818eeae61f46be737a9d3ccb92ce6638b2fb99f Verified that the landed commit is on |
…#150175) Port of openclaw/openclaw@c10542c855ea to aqiyoung/openclaw. - v2026.9.17.6
…#150175) Stop restarting native speech recognition at end of speech, which could cancel the pending transcript before chat.send. Leave restart handling with the existing result and error callbacks. Honor talk.realtime.mode=stt-tts by selecting the existing native recognition, Gateway chat, and talk.speak pipeline, using the configured Talk speech provider and voice while preserving realtime defaults. Add regression coverage for premature recognition restarts and explicit stt-tts selection. Fixes openclaw#150105 Fixes openclaw#150104 Co-authored-by: IWhatsskill <[email protected]>
Closes #150105
Closes #150104
What Problem This Solves
Fixes: Android Talk keeps beeping and never answers when it uses on-device speech recognition, and it ignores
talk.realtime.mode: "stt-tts", so a configured Talk voice can't be used.User Impact
User impact: on Android, Talk now sends what you say and speaks the reply. Operators who set
talk.realtime.modetostt-ttsget their configured Talk speech provider and voice (viatalk.speak) instead of the realtime provider's voice. Talk with realtime mode (the default) is unchanged.Why This Change Was Made
onResultsonly when the session closes, so the restart cancelled the session, and the cancel'sERROR_CLIENTcleared the listening state. The silence check then skipped sending.onResults/onErroralready restart the recognizer, so the restart at end of speech is removed.stt-ttswas ignored. Android always used the gateway relay, which carries only realtime sessions (the gateway requiresmanaged-roomforstt-tts).stt-ttsnow routes Android to native Talk: device STT, thenchat.send, thentalk.speak.Production code is net zero lines (11 removed, 11 added).
Evidence
Current head validation:
1818eeae61f46be737a9d3ccb92ce6638b2fb99fpassed CI run 35144123427, including Play, third-party and Wear unit tests/lint, ktlint, and the required CI gate. Independent P0–P2 review found no actionable findings. The device observations below remain contributor-provided; they were not repeated during maintainer review.Tests
TalkModeManagerTest.nativeTalkKeepsRecognitionOpenFromEndOfSpeechUntilResultsfails onmainwithEnd of speech must not cancel and restart the session before its results arrive, and passes with the fix.TalkModeConfigParsingTest.routesSttTtsModeToNativeTalkEvenWhenRelayIsSupportedfails onmainand passes with the fix../gradlew :app:testPlayDebugUnitTest :app:ktlintCheckpasses: 3277 tests, 0 failures, before rebase. After rebasing onto7d1c3674b60, the voice package (266 tests) and ktlint pass again.Live on a device. OnePlus 8T (Android 14),
playDebugbuild of this branch, gateway 2026.9.4,talk.realtime.mode: "stt-tts", and an OpenAI-compatible local TTS server astalk.provider.chat.sendever reached the gateway, and Talk looped on the recognizer start beep.stt-ttsalone (nogpt-livemodel override):ERROR_CLIENTand 0 skipped silence checks.Not covered here (pre-existing, filed separately):
buildPromptprepends fixed Talk instructions, including an ElevenLabs-specific voice hint, to the user's visible message.The Talk button's setup readiness still reflects only the realtime provider, so a gateway with
stt-ttsand no realtime provider may still show Talk as needing setup. I didn't change that.🤖 Generated with Claude Code