mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
Bug fixes: - @Synchronized on ElevenLabsStreamingTts.sendText/finish to prevent sentFullText/sentTextLength races across OkHttp and caller threads - Pre-set pendingRunId via onRunIdKnown callback before chat.send to eliminate race where gateway events arrive before runId is stored - Track drain coroutine as Job; cancel prior on rapid mic toggle to prevent duplicate TTS and stale transcript sends - Mic button disabled during 2s drain cooldown (micCooldown StateFlow) Codex review fixes: - Gate agent streaming TTS on sessionKey to prevent cross-session audio leaks (P1) - Clear ElevenLabs credentials when talk.provider is not elevenlabs; gate streaming TTS on activeProviderIsElevenLabs (P2) System TTS fallback fixes: - Null streamingTts immediately in finishStreamingTts so next response gets a fresh TTS instance - Add hasReceivedAudio flag to ElevenLabsStreamingTts to detect when WebSocket connects but returns no audio (invalid key, network error) - Fall back to playTtsForText when streaming TTS produced no audio - Track ttsJob to cleanly cancel prior playTtsForText on new response - Re-throw CancellationException instead of cascading into fallback attempts that also get cancelled