Skip to content

feat(tts): desktop Kokoro/Piper TTS v2 + user-editable Python path#232

Draft
anishgoyal1108 wants to merge 1 commit into
IReaderorg:masterfrom
anishgoyal1108:feat/desktop-kokoro-tts-v2
Draft

feat(tts): desktop Kokoro/Piper TTS v2 + user-editable Python path#232
anishgoyal1108 wants to merge 1 commit into
IReaderorg:masterfrom
anishgoyal1108:feat/desktop-kokoro-tts-v2

Conversation

@anishgoyal1108

Copy link
Copy Markdown

Description

Forward-ports the desktop v2 Kokoro/Piper TTS engine work and adds a
user-editable Python-interpreter override.

  • DesktopTTSEngineFactory: lazy createKokoroEngine() (gated on kokoroAvailable)
    • a DesktopKokoroTTSEngineV2 wrapper that delegates synthesis to
      KokoroTTSAdapter, with a per-(utterance, voice, speed) audio cache and bounded
      parallel pre-synthesis (respects the shared TTS-performance setting).
  • TTSController: persist + restore the selected EngineType across launches
    (persistedEngineType / saveEngineType).
  • Supporting: DesktopTTSService, TTSModule / TTSEngine / TTSState /
    TTSNotificationUseCase, TTSV2ScreenSpec, TTSStateAdapter,
    TTSEngineSettingsScreen, AndroidTTSEngineFactory.
  • AppPreferences: kokoroAvailable, selectedTTSEngine, and a new
    kokoroPythonPath override.
  • KokoroTTSEngine: honour kokoroPythonPath before auto-discovery, so users whose
    interpreter lives somewhere non-standard (pyenv / conda / venv / system package)
    can point Kokoro at it.

Type of Change

  • Core improvement

Testing

  • Compiled successfully (desktop) ← reviewer to confirm
  • Kokoro synthesis works with auto-discovered Python
  • Setting kokoroPythonPath to a specific interpreter is honoured

Additional Notes

Resolved against upstream's TTS refactors: kept upstream's debug log levels while
preserving the new persisted-engine-type hydration. Outstanding: a Settings text
field to edit kokoroPythonPath from the UI (the pref + engine plumbing are done).

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a7a0c0fb-103b-4ea7-9d98-744bae8cbe38

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

…ython path

Forward-ports the v2 desktop TTS engine work onto current upstream:

- DesktopTTSEngineFactory: lazy createKokoroEngine() (gated on kokoroAvailable)
  + DesktopKokoroTTSEngineV2 wrapper delegating synthesis to KokoroTTSAdapter,
  with a per-(utterance,voice,speed) audio cache and bounded parallel
  pre-synthesis (respects the shared TTS-performance setting).
- TTSController: persist + restore the selected EngineType across launches
  (persistedEngineType / saveEngineType).
- DesktopTTSService, TTSModule / TTSEngine / TTSState / TTSNotificationUseCase,
  TTSV2ScreenSpec, TTSStateAdapter, TTSEngineSettingsScreen, AndroidTTSEngineFactory.
- AppPreferences: kokoroAvailable, selectedTTSEngine, and a NEW user-editable
  kokoroPythonPath() override.
- KokoroTTSEngine: honour kokoroPythonPath before auto-discovery so users with a
  pyenv/conda/venv/system interpreter can point Kokoro at it from Settings.

Conflicts vs upstream's TTS refactors resolved (kept their debug log levels,
preserved the persisted-engine-type hydration).
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.

1 participant