fix(android): stabilize realtime talk connection state

This commit is contained in:
Ayaan Zaidi
2026-05-25 08:31:38 +05:30
parent 4656275202
commit ffb02a5919
2 changed files with 3 additions and 3 deletions

View File

@@ -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() },

View File

@@ -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)