惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
G
Google Developers Blog
D
Docker
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
T
The Blog of Author Tim Ferriss
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
I
InfoQ
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
Google DeepMind News
Google DeepMind News

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(android): keep talk mode on realtime relay · openclaw...
obviyus · 2026-05-25 · via Recent Commits to openclaw:main

@@ -157,7 +157,6 @@ class TalkModeManager internal constructor(

157157

private val completedRunStates = LinkedHashMap<String, Boolean>()

158158

private val completedRunTexts = LinkedHashMap<String, String>()

159159

private var configLoaded = false

160-

private var executionMode = TalkModeExecutionMode.Native

161160

private val startGeneration = AtomicLong(0L)

162161163162

@Volatile private var realtimeSessionId: String? = null

@@ -526,53 +525,17 @@ class TalkModeManager internal constructor(

526525

try {

527526

ensureConfigLoaded()

528527

if (generation != startGeneration.get() || !_isEnabled.value || stopRequested) return@launch

529-

if (executionMode == TalkModeExecutionMode.RealtimeRelay) {

530-

startRealtimeRelay(generation)

531-

} else {

532-

startNativeRecognition(generation)

533-

}

528+

startRealtimeRelay(generation)

534529

} catch (err: Throwable) {

535530

if (err is CancellationException) return@launch

536531

_statusText.value = "Start failed: ${err.message ?: err::class.simpleName}"

537532

Log.w(tag, "start failed: ${err.message ?: err::class.simpleName}")

538-

if (executionMode == TalkModeExecutionMode.RealtimeRelay) {

539-

stopRealtimeRelay(closeSession = false, preserveStatus = true)

540-

disableRealtimeModeAndNotifyOwner()

541-

}

533+

stopRealtimeRelay(closeSession = false, preserveStatus = true)

534+

disableRealtimeModeAndNotifyOwner()

542535

}

543536

}

544537

}

545538546-

private suspend fun startNativeRecognition(generation: Long) {

547-

withContext(Dispatchers.Main) {

548-

if (generation != startGeneration.get()) return@withContext

549-

if (!_isEnabled.value || stopRequested) return@withContext

550-

if (_isListening.value) return@withContext

551-

Log.d(tag, "start native")

552-553-

if (!SpeechRecognizer.isRecognitionAvailable(context)) {

554-

_statusText.value = "Speech recognizer unavailable"

555-

Log.w(tag, "speech recognizer unavailable")

556-

return@withContext

557-

}

558-559-

val micOk =

560-

ContextCompat.checkSelfPermission(context, Manifest.permission.RECORD_AUDIO) ==

561-

PackageManager.PERMISSION_GRANTED

562-

if (!micOk) {

563-

_statusText.value = "Microphone permission required"

564-

Log.w(tag, "microphone permission required")

565-

return@withContext

566-

}

567-568-

recognizer?.destroy()

569-

recognizer = SpeechRecognizer.createSpeechRecognizer(context).also { it.setRecognitionListener(listener) }

570-

startListeningInternal(markListening = true)

571-

startSilenceMonitor()

572-

Log.d(tag, "listening")

573-

}

574-

}

575-576539

private fun stop() {

577540

stopRequested = true

578541

finalizeInFlight = false

@@ -2221,11 +2184,9 @@ class TalkModeManager internal constructor(

22212184

val parsed = TalkModeGatewayConfigParser.parse(root?.get("config").asObjectOrNull())

22222185

silenceWindowMs = parsed.silenceTimeoutMs

22232186

parsed.interruptOnSpeech?.let { interruptOnSpeech = it }

2224-

executionMode = parsed.executionMode

22252187

configLoaded = true

22262188

} catch (_: Throwable) {

22272189

silenceWindowMs = TalkDefaults.defaultSilenceTimeoutMs

2228-

executionMode = TalkModeExecutionMode.Native

22292190

configLoaded = false

22302191

}

22312192

}