Skip to content

[codex] Fix Read Aloud setup fallback readiness#251

Merged
ilysenko merged 2 commits into
ilysenko:mainfrom
avifenesh:codex/read-aloud-setup-fallback-fixes
May 20, 2026
Merged

[codex] Fix Read Aloud setup fallback readiness#251
ilysenko merged 2 commits into
ilysenko:mainfrom
avifenesh:codex/read-aloud-setup-fallback-fixes

Conversation

@avifenesh
Copy link
Copy Markdown
Collaborator

@avifenesh avifenesh commented May 19, 2026

Refs #234.

What changed

This tightens the Read Aloud setup path so the settings UI reports readiness only when a speech backend can actually run:

  • persist Kokoro Python/model/voices paths after the download flow
  • pass CODEX_LINUX_READ_ALOUD_KOKORO_PYTHON into the app-side Kokoro runner
  • fall back from the staged runner path to kokoro-stdin on PATH
  • add a small Linux audio environment repair for spawned speech commands when XDG_RUNTIME_DIR is missing
  • make native spd-say / espeak-ng fallback available by default inside the already opt-in feature, with CODEX_LINUX_READ_ALOUD_NATIVE_FALLBACK=0 as the opt-out
  • stop forcing spd-say -t female1; use the distro default unless the user explicitly sets CODEX_LINUX_READ_ALOUD_VOICE_TYPE
  • send a User-Agent for Hugging Face model downloads from both the UI helper and shell installer
  • keep Read Aloud controls only in the dedicated Read Aloud settings section, and remove/clean up the older normal-settings injection path

Why

A user report in #234 showed the setting could be enabled and the model installed manually, but clicking the speech icon still produced no sound. The previous setup flow could also return ok: true after only selecting model files, even when Python, aplay, the runner, or a native fallback were not available.

The settings UI also had duplicate surfaces: the dedicated Read Aloud section plus a normal/general settings row. This keeps the feature in one clear settings location.

Validation

  • node --test linux-features/read-aloud/test.js linux-features/read-aloud-mcp/test.js
  • cargo test -p codex-read-aloud-linux
  • cargo check -p codex-read-aloud-linux
  • bash -n linux-features/read-aloud/install-kokoro-runtime.sh
  • node --check linux-features/read-aloud/patch.js
  • git diff --check
  • node --test linux-features/*/test.js

@avifenesh avifenesh marked this pull request as ready for review May 19, 2026 23:46
@ilysenko ilysenko merged commit b7d1c41 into ilysenko:main May 20, 2026
5 checks passed
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.

2 participants