mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
fix(android): stabilize realtime talk connection state
This commit is contained in:
@@ -515,7 +515,7 @@ class NodeRuntime(
|
||||
context = appContext,
|
||||
scope = scope,
|
||||
session = operatorSession,
|
||||
isConnected = { operatorConnected },
|
||||
isConnected = { _isConnected.value },
|
||||
onBeforeSpeak = { micCapture.pauseForTts() },
|
||||
onAfterSpeak = { micCapture.resumeAfterTts() },
|
||||
).also { speaker ->
|
||||
@@ -622,7 +622,7 @@ class NodeRuntime(
|
||||
context = appContext,
|
||||
scope = scope,
|
||||
session = operatorSession,
|
||||
isConnected = { operatorConnected },
|
||||
isConnected = { _isConnected.value },
|
||||
onBeforeSpeak = { micCapture.pauseForTts() },
|
||||
onAfterSpeak = { micCapture.resumeAfterTts() },
|
||||
onStoppedByRelay = { finishTalkModeAfterRelayClose() },
|
||||
|
||||
@@ -578,7 +578,7 @@ class TalkModeManager internal constructor(
|
||||
while (true) {
|
||||
realtimeSessionId?.let { return@withTimeout it }
|
||||
val status = _statusText.value
|
||||
if (!_isEnabled.value && status.startsWith("Talk failed")) {
|
||||
if (!_isEnabled.value && status != "Off") {
|
||||
throw IllegalStateException(status)
|
||||
}
|
||||
delay(100L)
|
||||
|
||||
Reference in New Issue
Block a user