Skip to content

feat(tts): local Kokoro neural voices as the default text-to-speech provider - #1686

Merged
karkarl merged 7 commits into
openclaw:mainfrom
larroy:feat/kokoro-tts
Oct 17, 2026
Merged

karkarl merged 7 commits into
openclaw:mainfrom
larroy:feat/kokoro-tts

Conversation

@larroy

@larroy larroy commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The tray's default local voice (Piper) sounds robotic, and the cloud voices need an API key and send text off the device. There was no high-quality, fully local default.

This neural voice runs with ONNX runtime from a C++ library wrapped in a .net package published with nuget. It has no python / pytorch dependencies.

There's already a dependency on ONNX runtime for other TTS engines.

Screenshots and demo

kokoro.cpp.openclaw.windows.node.mp4
01-voice-fresh 02-kokoro-fresh 02-kokoro-fresh-crop 03-kokoro-downloading 03-kokoro-downloading-crop 04-kokoro-ready 04-kokoro-ready-crop 05-dora-not-downloaded 05-dora-not-downloaded-crop 06-dora-ready 06-dora-ready-crop 07-dora-deleted 07-dora-deleted-crop

User Impact

User impact: fresh installs speak with Kokoro, a local neural voice that never leaves the PC. Voice & Audio offers two downloadable voice packs: English and Chinese (Kokoro v1.1, about 379 MB) and Spanish (Kokoro v1.0, about 312 MB). Existing installs keep their current provider. Until a pack is downloaded, speech with no explicit provider falls back to Windows voices as before.

Why This Change Was Made

Kokoro runs through kokoro.cpp, published on nuget.org as Larroy.Kokoro 0.1.0. Kokoro follows the same pattern as Piper: the native engine ships in the package, and the model files download on demand and are checked against pinned SHA-256 hashes. The package uses the tray's existing ONNX Runtime 1.30.0 instead of adding a second onnxruntime.dll. It ships the pronunciation dictionaries itself (kokoro-dict\), because they must match the engine version.

Loading a voice pack takes about 14 s and a few hundred MB of memory. Three places in the tray each create their own TTS service, so one shared, app-wide engine owns the loaded model. Previews, chat read-aloud and tts.speak all reuse it.

Implementation notes
  • KokoroModelManager (Shared): pack catalog, download with a single in-flight download per pack, an install marker, hash check before files are moved into place, and cleanup on failure.
  • KokoroSpeechEngine (Tray): holds the single loaded model and serializes loading and synthesis, since the native context is not thread-safe. UnloadAsync runs before a pack is deleted.
  • PcmWavEncoder: the float-PCM-to-WAV conversion moved out of the Piper client verbatim so both engines share it.
  • TtsCapability.KokoroProvider, SettingsData.TtsKokoroVoiceId, readiness and the setup-required check.
  • Voice Settings: Kokoro panel (voice, download with progress, delete, preview) and 20 new strings in all 6 locales.
  • MCP tts.* descriptions, the winnode skill, and Test-ReleaseNativeDependencies.ps1 now check kokoro.dll, Kokoro.Net.dll, kokoro-dict\vocab.txt and KokoroContext.Version().

Evidence

  • Full required validation passes against the nuget.org package (restore source confirmed as https://api.nuget.org/v3/index.json).
  • The self-contained win-x64 publish passes the release native dependency policy, with exactly one onnxruntime.dll (1.30.0) and kokoro-dict\ present.
  • Live isolated tray: fresh-install defaults, download, preview (audio heard), the shared loaded model, Spanish pack download, preview and delete, plus winnode tts.status/tts.speak before and after download. Details below.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • windows-winui-interactive: Voice & Audio settings gained the Kokoro provider panel (download, progress, delete, preview) and Kokoro is the new default selection.
  • windows-clean-installer-upgrade: the payload gains kokoro.dll, Kokoro.Net.dll and the kokoro-dict\ folder, and the default TTS provider changes for fresh installs. Upgrades must keep the existing provider.

Validation

Run on 3d873299, win-x64, after removing the local feed and purging the cached larroy.kokoro* packages so restore pulled from nuget.org:

  • ./build.ps1: all 5 projects built.
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: Passed 4273, Skipped 36, Failed 0.
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: Passed 3996, Failed 0.
  • dotnet test ./tests/OpenClaw.WinNode.Cli.Tests/OpenClaw.WinNode.Cli.Tests.csproj --no-restore: Passed 129, Failed 0.
  • dotnet publish src/OpenClaw.Tray.WinUI -c Release -r win-x64 --self-contained + .\scripts\Test-ReleaseNativeDependencies.ps1 -RequireAppLocalVCRuntime: Release native dependency policy passed. (the probe throws if KokoroContext.Version() is empty), kokoro-dict\vocab.txt present, 1 onnxruntime.dll.

New or updated tests:

  • KokoroModelManagerTests: voice-to-pack lookup is case-sensitive, voice ids are unique, and an install is "downloaded" only with no marker and both files present; delete removes it.
  • AssetHashPinningTests.EveryKokoroAsset_HasPinnedSha256AndHttpsUrl.
  • Default-provider and fallback rows in CapabilityTests, settings round-trip of TtsKokoroVoiceId.
  • NativeSpeechStackRuntimeTests loads kokoro.dll and checks kokoro-dict.
  • SkillMdDriftTests provider list.

Real Behavior Proof

  • Environment tested: Windows 11 x64 (10.0.26100), isolated tray data dir (run-app-local.ps1 -NoBuild -DataDir <temp>), MCP-only mode (EnableMcpServer=true, NodeTtsEnabled=true, no gateway).
  • PR head or commit tested: 3d873299 source; the UI run used the locally packed Larroy.Kokoro 0.1.0 before the nuget.org push, and the gates above were rerun against the nuget.org package.
  • Exact steps or command run:
    1. Fresh data dir, open Voice & Audio.
    2. Download Voice Pack (English and Chinese), then Preview twice.
    3. winnode tts.status / tts.speak before and after the download.
    4. Select "Español (ES): Dora", download, preview, tts.speak with ef_dora, then Delete and tts.speak again.
    5. Separate data dir with "TtsProvider":"piper".
  • Evidence after fix:
    • Fresh settings persisted "TtsProvider": "kokoro" and "TtsKokoroVoiceId": "af_maple". The UI showed Provider "Kokoro (local neural voices)", Voice "English (US): Maple", "Voice pack not downloaded yet. Click Download to fetch it (about 379 MB)."
    • Before download, tts.status returned configuredProvider: "kokoro", effectiveProvider: "windows", willFallBack: true, providers[0] = { provider: "kokoro", readiness: "voice-not-downloaded" }. tts.speak {"text":"fallback"} returned provider: "windows", requestedProvider: "kokoro", fellBack: true. Explicit provider: "kokoro" returned Speak failed.
    • The download finished in about 19 s with determinate progress ("Downloading… 160.0 / 379.0 MB"), then showed "Voice pack ready on this PC (379.0 MB)."
    • Log: Kokoro voice pack 'v1.1-en-zh' verified and ready, then Kokoro voice pack 'v1.1-en-zh' loaded in 13717 ms (kokoro 0.1.0), logged once. The second preview and every MCP call afterwards reused the loaded model.
    • After download, tts.status returned effectiveProvider: "kokoro", willFallBack: false, and kokoro ready. tts.speak {"text":"Hello from Kokoro","provider":"kokoro","voiceId":"af_maple"} returned provider: "kokoro", fellBack: false, contentType: "audio/wav", durationMs: 3588. With no provider it also used kokoro.
    • Spanish: ef_dora returned Speak failed before its pack was downloaded. After the pack was downloaded (311.9 MB) and the preview loaded it (loaded in 13996 ms), it returned provider: "kokoro", fellBack: false. Delete showed "Voice pack deleted." and removed models\kokoro\v1.0-es, and ef_dora returned Speak failed again.
    • Existing user with "TtsProvider":"piper": tts.status reported configuredProvider: "piper".
  • Observed result: speech audibly played in English (Maple) and Spanish (Dora).
  • Screenshot or artifact links verified? No. Screenshots will be added after the PR opens.
  • Not verified or blocked:
    • Gateway node.invoke path (only local MCP was exercised).
    • Native win-arm64 tray build and launch.
    • MSIX packaging in openclaw-windows-packaging carrying kokoro-dict\ (the Inno installer includes it via recursesubdirs).
    • Rubber-duck review is pending.

Security Impact

  • New permissions or capabilities? No (new provider value for the existing tts.* commands).
  • Secrets or tokens handling changed? No
  • New or changed network calls? Yes
  • Command or tool execution surface changed? No
  • Data access scope changed? No
  • If any answer is Yes, explain the risk and mitigation: voice packs download on explicit user action from GitHub releases (larroy/kokoro.cpp voices_model_files and thewh1teagle/kokoro-onnx model-files-v1.0) through the existing AllowedAssetDownload host allowlist. Each file is verified against a pinned SHA-256 before it is moved into place, and a mismatch deletes the partial download. Synthesis is fully local, with no text or audio egress.

Compatibility and Migration

  • Backward compatible? Yes
  • Config or environment changes? Yes
  • Migration needed? No
  • If yes, list the exact upgrade steps: new setting TtsKokoroVoiceId (default af_maple). The default TtsProvider for new settings files changes from piper to kokoro. Existing settings files keep their persisted provider, and no user action is needed.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

@clawsweeper

clawsweeper Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@larroy
larroy requested review from karkarl and shanselman and removed request for shanselman October 9, 2026 04:22
@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 9, 2026
@clawsweeper

clawsweeper Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex review: blocked before merge.

What this changes

Adds Kokoro, a local neural text-to-speech engine, with downloadable voice packs, language-specific previews, and a fresh-install default that preserves existing provider settings.

Example: A user downloads the English and Chinese voice pack and requests speech with af_maple.

  • Before: The Kokoro provider is unavailable.
  • After: Kokoro generates local WAV audio using the Maple voice.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The integration is useful and the previous defects are repaired, but current-head proof and the default-provider product choice limit readiness.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Needs a maintainer decision
User problem: Users seeking better local speech currently choose between Piper's voice quality and cloud voices that require credentials and send text off the PC.
Reason: A better local voice has clear value, and the provider integration fits existing architecture. Replacing the established fresh-install default still needs speech-area owner direction.

Merge readiness

⛔ Blocked before merge - 3 items remain

This collaborator-authored PR contains useful work absent from main. The latest commit fixes all four prior findings, and no remaining discrete patch defect was established.

Priority: P2
Reviewed head: 66506e62c8976dd4497939b3adf50bd954788141
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should Kokoro replace Piper as the fresh-install speech default, or remain an additional selectable local provider?
  • Recommendation: Adopt Kokoro for fresh installs: Use Kokoro for new settings while preserving every existing provider choice and legacy Piper resolution.
  • Why: This changes the established speech default and adds a native dependency; no recorded speech-area owner decision covers that choice.

Before merge

  • Resolve merge risk - Verify Kokoro synthesis and dictionary availability from the produced ARM64 and MSIX installations; the supplied x64 publish result does not establish those shipping paths.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: Current-head UI evidence for the download fixes and language-specific previews, plus a latest-stable upgrade retaining existing settings and speech assets, are not established by the earlier runtime run.
Agent review details

How this fits together

The Windows tray turns text from voice previews, chat read-aloud, and node or MCP commands into audible speech. Saved provider settings and downloaded assets select the engine, with Windows speech providing the configured-provider fallback.

flowchart TD
 A[Preview or speech command] --> B[Saved provider and voice]
 B --> C{Provider ready?}
 C -->|Kokoro ready| D[Shared Kokoro engine]
 E[Verified downloaded voice pack] --> D
 C -->|Configured provider unavailable| F[Windows speech fallback]
 D --> G[Audio playback]
 F --> G
Loading

Technical review

Best possible solution:

Keep Kokoro within the existing speech pipeline, preserve legacy settings, and settle the fresh-install default with the speech-area owner.

Do we have a high-confidence way to reproduce the issue?

Not applicable to this feature proposal; the existing local provider and fallback contracts are established in source and merged speech PRs.

Is this the best way to solve the issue?

Yes for the integration approach: it extends the existing provider pipeline and gives the expensive, non-thread-safe context one shared owner. The fresh-install default remains a product choice.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 037c17dcb581.

Merge-risk options

Maintainer options:

  1. Validate the remaining shipping payloads (recommended)
    Exercise Kokoro from ARM64 and MSIX installations with the packaged dictionaries before rolling out the new provider.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Régis Brid: Raw commit b0ba9af adds src/OpenClaw.Shared/Capabilities/TtsCapability.cs:17 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b0ba9affa25d; files: src/OpenClaw.Shared/Capabilities/TtsCapability.cs)
  • Barbara Kudiess: Raw commit ff5cafb adds src/OpenClaw.Shared/Capabilities/TtsCapability.cs:98 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ff5cafb52f52; files: src/OpenClaw.Shared/Capabilities/TtsCapability.cs)

Review metrics

Metric Value Why it matters
Production and test growth Production +1315/-71 lines; tests +219/-4 lines The downloadable provider, shared native engine, and six-locale controls explain the production growth.

Labels

Label changes:

  • remove status: ⏳ waiting on author: Current PR status no longer selects a status label.

Label justifications:

  • P2: This is a bounded speech-quality feature rather than an urgent failure of existing speech.
  • merge-risk: 🚨 compatibility: The new native provider and dictionaries must work on supported ARM64 and MSIX installation paths that remain unverified.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-09T04:34:44.803Z sha 3d87329 :: blocked before merge. :: [P1] Preserve Piper resolution when loading legacy settings | [P2] Bind download progress to the active voice pack | [P2] Give download failures an actionable recovery message
  • reviewed 2026-10-09T06:52:49.994Z sha 6c811f1 :: blocked before merge. :: [P1] Preserve Piper resolution when loading legacy settings | [P2] Bind download progress to the active voice pack | [P2] Give download failures an actionable recovery message
  • reviewed 2026-10-09T07:08:41.529Z sha 8ee4fb4 :: blocked before merge. :: [P1] Preserve Piper resolution when loading legacy settings | [P2] Bind download progress to the active voice pack | [P2] Give download failures an actionable recovery message | [P2] Remove the inconsistent Spanish sentence assertions

Reviewed October 9, 2026, 3:56 AM ET / 07:56 UTC (Revision 4).

@clawsweeper clawsweeper Bot removed the proof: sufficient Contributor real behavior proof is sufficient. label Oct 9, 2026
@socket-security

socket-security Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednuget/​larroy.kokoro@​0.1.01001009910090

View full report

@socket-security

socket-security Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
Low priority
Low adoption: nuget larroy.kokoro.runtime.win-arm64

Location: Package overview

From: src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj → nuget/[email protected] → nuget/[email protected]

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
Low adoption: nuget larroy.kokoro.runtime.win-x64

Location: Package overview

From: src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj → nuget/[email protected] → nuget/[email protected]

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
Low adoption: nuget larroy.kokoro

Location: Package overview

From: src/OpenClaw.Tray.WinUI/OpenClaw.Tray.WinUI.csproj → nuget/[email protected]

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore nuget/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

@larroy
larroy marked this pull request as ready for review October 9, 2026 07:42
@clawsweeper clawsweeper Bot removed the status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. label Oct 9, 2026
@karkarl

karkarl commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Global triage: HOLD_FOR_AUTHOR. Take confidence 20%; recommendation confidence 98%; effort large; risk high.

Reviewed exact head 66506e62c897. GitHub currently reports CLEAN with 28 passing, 1 failing, and 0 pending checks. proof pools are declared. Durable automated signal: Codex review: blocked before merge..

Author: investigate the 1 failing check(s), establish whether each failure is branch-owned, and publish a green exact-head CI Gate before reconsideration.

This is a triage classification, not a merge action. No branch changes were made.

@larroy

larroy commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

@karkarl which failed check?

@larroy

larroy commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

@RomneyDa please help move this forward.

@larroy

larroy commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper this should be ready for maintainer look

@clawsweeper

clawsweeper Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

@clawsweeper this should be ready for maintainer look is retired; ClawSweeper now only reviews.

@larroy larroy added the status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. label Oct 13, 2026
@karkarl

karkarl commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Global triage: NEEDS_HUMAN_TEST. Take confidence 70%; recommendation confidence 96%; effort large; risk high.

Reviewed exact head 40518f34d0de. CI is green and no remaining source blocker was verified; legacy-provider migration, download integrity/progress, incomplete-download handling, cancellation ownership, preview behavior, and missing-pack fallback are source-clear.

Required proof remains: actual ARM64 and installed-MSIX synthesis with dictionary/model assets, current-head download/preview/delete UI, latest-stable upgrade preserving provider/settings/assets, gateway-mediated invocation, and speech-owner acceptance of the fresh-install default/native dependency. No fixes or branch changes were made by this review.

larroy and others added 4 commits October 16, 2026 16:52
Adds the kokoro provider backed by Larroy.Kokoro 0.1.0 (nuget.org). Voice packs (v1.1 English+Chinese, v1.0 Spanish) download at runtime with pinned SHA-256; G2P dictionaries ship in the package as kokoro-dict/. A process-wide KokoroSpeechEngine owns the single loaded context. Fresh installs default to Kokoro; existing settings keep their provider. Updates Voice Settings UI and all locales, MCP tts.* descriptions, winnode skill, release native probe, and tests.
Kokoro and Piper Preview read a sentence matching the voice's language (VoicePreviewText, keyed by BCP-47 tag with primary-subtag fallback) instead of the UI-localized English sentence. Adds Spanish and Chinese sentences; unknown languages keep the localized text. Adds KokoroModelManager.FindVoice.
…loads

Settings files that omit or blank TtsProvider resolve to Piper again (SettingsData.LegacyDefaultTtsProvider); only freshly created settings default to Kokoro. Lock the Kokoro voice picker during a download and drop late progress reports. Show actionable disk-full, network, and integrity failure messages in all locales. Replace copy-pinning preview tests with behavioral ones.
Keep preview completion and duplicate clicks from replacing active download UI state. Add source-method overlap and lifecycle regressions.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 2abf7cc2-7010-4713-b335-98b25e4ac7cd
Keep terminal recovery independent of model storage availability. Cover refresh errors after both failed and successful transfers.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 2abf7cc2-7010-4713-b335-98b25e4ac7cd
karkarl and others added 2 commits October 16, 2026 18:30
Reuse bounded-process test isolation without weakening deadlines or internal concurrency. Complete the loopback close handshake across both transports and enable dump-free Shared test hang diagnostics.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 2abf7cc2-7010-4713-b335-98b25e4ac7cd
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 2abf7cc2-7010-4713-b335-98b25e4ac7cd
@karkarl

karkarl commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Updated verdict: TAKE

Recommend taking this PR at a0e2148fd3cb94bf7455f5485ce3af03ab0d06aa. Estimated take confidence: 95%.

This supersedes my earlier HOLD recommendation. The blocking source findings were repaired and cleared by re-review, current CI is green, and the maintainer has now manually checked the isolated native ARM64 app and reported: "I've verified locally, everything looks good." That supplies the local behavior confirmation missing from the earlier assessment. The confidence rating is an engineering judgment, not a measured probability.

Review findings

Both models agree on closure of the repaired findings:

Issue Opus 5.5 GPT-6 Astra Fix confidence
Preview completion overwrites another pack's active download controls Closed Closed 95%
Storage-status refresh failure prevents terminal download recovery Closed Closed 95%

The storage issue was initially found by Astra and then corroborated by Opus. Both independently reviewed the final repair and reported no actionable or blocking findings in that repair delta.

Two pre-existing, non-blocking status-text observations remain:

Issue Opus 5.5 GPT-6 Astra Fix confidence
A late preview completion can replace an already-terminal download failure message LOW not flagged 90%
A delayed delete completion can temporarily replace an active download's status text LOW not flagged 99%

These are follow-up cleanup, not reasons to hold this repaired PR. They are distinct from the active-download control ownership bug that was fixed.

This is an updated disposition of the existing Hanselman review, not a claim that the later CI-only changes received a new dual-model review. The reviewed Kokoro patches were preserved unchanged through the contributor's rebase.

Validation and manual confirmation

Current-head CI is successful: 17 successful checks, 7 skipped, no failed or pending checks, and CI Gate passed. This includes x64/ARM64 MSIX builds, the x64 release smoke, the multi-architecture bundle, all three E2E lanes, UI tests, and accessibility scans.

Local command Result
.\build.ps1 All five projects passed, normal ARM64 build
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore 4,370 passed, 35 skipped
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore 4,121 passed
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --filter FullyQualifiedName~ChatComposerControllerTests 56 passed

The manual app used separate settings and model storage, with no gateway connection. Following the maintainer's check, authenticated local MCP tts.status reported configuredProvider: kokoro, effectiveProvider: kokoro, readiness: ready, and willFallBack: false. This confirms readiness without Windows fallback; it is not a claim that this status call itself synthesized audio.

One separate onboarding UI assertion passed on a single unchanged-head retry. Its intermittent cause was not fixed, and green CI should not be read as a claim that all flakiness has been eliminated.

Default-provider direction and remaining limits

Kokoro's default status may be temporary. The maintainer has noted a possible later pivot to Windows ML-provided TTS. Taking this PR does not commit the project to Kokoro as its permanent provider, and that possible pivot is not implemented or promised by this PR.

Installed-MSIX ARM64 synthesis, latest-stable upgrade retention, a dedicated MCP speech invocation, and gateway-mediated speech were not separately demonstrated in this validation pass. The manual confirmation is user-reported; no screenshot or recording was collected. These qualification gaps remain explicit and no unexecuted proof pool is being marked complete.

On the available review, CI, and maintainer manual evidence, my recommendation is now TAKE rather than HOLD. The remaining LOW observations and broader qualification gaps do not change that recommendation for this PR. This is a merge recommendation, not a merge action.

@karkarl
karkarl merged commit 2a33672 into openclaw:main Oct 17, 2026
42 of 44 checks passed
@larroy

larroy commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator Author

Thank you Karen!

larroy added a commit to larroy/openclaw-windows-node that referenced this pull request Oct 20, 2026
…rovider (openclaw#1686)

* feat(tts): add Kokoro local TTS provider via kokoro.cpp as the default

Adds the kokoro provider backed by Larroy.Kokoro 0.1.0 (nuget.org). Voice packs (v1.1 English+Chinese, v1.0 Spanish) download at runtime with pinned SHA-256; G2P dictionaries ship in the package as kokoro-dict/. A process-wide KokoroSpeechEngine owns the single loaded context. Fresh installs default to Kokoro; existing settings keep their provider. Updates Voice Settings UI and all locales, MCP tts.* descriptions, winnode skill, release native probe, and tests.

* improve(tts): preview local voices in their own language

Kokoro and Piper Preview read a sentence matching the voice's language (VoicePreviewText, keyed by BCP-47 tag with primary-subtag fallback) instead of the UI-localized English sentence. Adds Spanish and Chinese sentences; unknown languages keep the localized text. Adds KokoroModelManager.FindVoice.

* fix(tts): keep upgraded settings on Piper and harden Kokoro pack downloads

Settings files that omit or blank TtsProvider resolve to Piper again (SettingsData.LegacyDefaultTtsProvider); only freshly created settings default to Kokoro. Lock the Kokoro voice picker during a download and drop late progress reports. Show actionable disk-full, network, and integrity failure messages in all locales. Replace copy-pinning preview tests with behavioral ones.

* fix(tts): preserve active Kokoro download controls

Keep preview completion and duplicate clicks from replacing active download UI state. Add source-method overlap and lifecycle regressions.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 2abf7cc2-7010-4713-b335-98b25e4ac7cd

* fix(tts): recover controls when Kokoro storage refresh fails

Keep terminal recovery independent of model storage availability. Cover refresh errors after both failed and successful transfers.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 2abf7cc2-7010-4713-b335-98b25e4ac7cd

* test(ci): stabilize process timing and WebSocket fixture shutdown

Reuse bounded-process test isolation without weakening deadlines or internal concurrency. Complete the loopback close handshake across both transports and enable dump-free Shared test hang diagnostics.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 2abf7cc2-7010-4713-b335-98b25e4ac7cd

* test(chat): isolate disposal reentrancy from pool scheduling

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 2abf7cc2-7010-4713-b335-98b25e4ac7cd

---------

Co-authored-by: Karen Lai <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 2abf7cc2-7010-4713-b335-98b25e4ac7cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants