Skip to content

Add managed local Kokoro voice output and offline playback - #26

Merged
nolanmak merged 9 commits into
mainfrom
feat/local-kokoro
Oct 15, 2026
Merged

nolanmak merged 9 commits into
mainfrom
feat/local-kokoro

Conversation

@nolanmak

Copy link
Copy Markdown
Owner

Outcome

Agentflow can speak replies locally with Kokoro CPU inference, independently of Whisper input and native-agent reasoning. Explicit setup verifies the model, voices and Python packages; local output uses no cloud key or fallback. Browser settings, voice test, ordered playback, and CLI/MCP speak use the selected local voice.

Interrupt now remains available during synthesis, late replay callbacks cannot overwrite interruption, failed output stops queued sentences until explicit replay, and long unpunctuated replies retain their full text. Native playback preserves WAV file type.

Acceptance and TDD evidence

Closes #24. Criteria and actual red/green failures are mapped in docs/local-kokoro-validation.md; setup, licenses, limitations and reproducible offline QA are in docs/local-kokoro.md.

  • Typecheck/build,65Node tests,19Playwright tests, managed runtime tests and9Whisper lifecycle regressions pass locally.
  • Real M3 CPU model and application QA ran with external outbound networking blocked: valid PCM synthesis, CLI speech and MCP speech through afplay all passed.
  • Synthetic5.735s utterance: cold1.975s, warm1.714–1.741s; runtime about754MiB RSS. Browser playback pause measured1.3–2.8ms against250ms criterion.
  • Runtime checks model hashes, loopback host/origin, bounded requests/output, process ownership, startup failures/recovery and canceled work. CI runs no real model download or personal sessions.

Limits

Python3.12–3.13 is required for explicit runtime setup. English stock voices; CPU inference finishes its current bounded chunk after cancellation, then skips remaining chunks. Native audio-player execution is verified; subjective listening, microphone/echo and sleep/wake are not claimed and remain under device QA#23. The local speech choice does not make native-agent reasoning local.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 930b5ddc-6f7e-4b59-b3a1-9819a2bb1f70
📥 Commits

Reviewing files that changed from the base of the PR and between 7e85f8d and 2efdb89.

📒 Files selected for processing: 24
  • .github/workflows/ci.yml
  • README.md
  • docs/local-kokoro-validation.md
  • docs/local-kokoro.md
  • public/app.ts
  • public/contracts.ts
  • public/dom.ts
  • public/index.html
  • public/voice.ts
  • scripts/build-assets.ts
  • scripts/kokoro-requirements.txt
  • scripts/live-local-kokoro.mjs
  • scripts/local-kokoro.py
  • scripts/test_local_kokoro.py
  • src/cli.ts
  • src/server.ts
  • src/speech.ts
  • src/state.ts
  • src/store.ts
  • test/browser/dashboard.spec.ts
  • test/build.test.ts
  • test/local-kokoro.test.ts
  • test/playback-speed.test.ts
  • test/voice.test.ts
+-------------------------------------------------------+
| Cancel my subscriptions ... I'm tired of your issues. |
+-------------------------------------------------------+
  \
   \     /)/)
        ( '')
        /  |
      o(___)
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nolanmak
nolanmak merged commit 031fbd5 into main Oct 15, 2026
2 of 3 checks passed
@nolanmak
nolanmak deleted the feat/local-kokoro branch October 15, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add managed local Kokoro voice output with offline playback and interruption

1 participant