Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions linux-features/read-aloud-mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This feature stages a separate `read-aloud` Codex plugin with a native Rust MCP
server. It does not enable microphone input or conversation mode. The first MCP
surface is intentionally small:

- `doctor` reports whether Kokoro, a custom command, or explicit native fallback
- `doctor` reports whether Kokoro, a custom command, or native fallback
is available.
- `read_aloud` speaks text only when the user or agent explicitly asks for it.
- `stop` interrupts playback started by the MCP server.
Expand Down Expand Up @@ -63,10 +63,12 @@ The MCP server reads the same overrides as the UI feature:
- `CODEX_LINUX_READ_ALOUD_KOKORO_VOICE`
- `CODEX_LINUX_READ_ALOUD_KOKORO_SPEED`
- `CODEX_LINUX_READ_ALOUD_KOKORO_LANG`
- `CODEX_LINUX_READ_ALOUD_NATIVE_FALLBACK=1`
- `CODEX_LINUX_READ_ALOUD_NATIVE_FALLBACK=0`

Native `spd-say` / `espeak-ng` fallback stays disabled unless explicitly
requested because the voice quality is usually worse than Kokoro.
Native `spd-say` / `espeak-ng` fallback is available by default after this
opt-in MCP plugin is enabled, but Kokoro remains preferred. Set
`CODEX_LINUX_READ_ALOUD_NATIVE_FALLBACK=0` to disable the machine voice
fallback.

## Validate

Expand Down
10 changes: 6 additions & 4 deletions linux-features/read-aloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,14 @@ cleaned response text to stdin:
CODEX_LINUX_READ_ALOUD_COMMAND="/path/to/tts-stdin-command" codex-desktop
```

System TTS fallbacks are disabled by default because `spd-say` and `espeak-ng`
are widely available but usually unpleasant. Enable them explicitly only when
that tradeoff is acceptable:
When Kokoro is not ready, Read Aloud can fall back to system TTS through
`spd-say` or `espeak-ng`. This fallback is enabled by default only after the
user has opted into the Read Aloud feature/runtime; Kokoro remains the preferred
backend when it is available. Disable the native fallback if the machine voice
is not acceptable:

```bash
CODEX_LINUX_READ_ALOUD_NATIVE_FALLBACK=1 codex-desktop
CODEX_LINUX_READ_ALOUD_NATIVE_FALLBACK=0 codex-desktop
```

The handler never invokes a shell for response text.
8 changes: 5 additions & 3 deletions linux-features/read-aloud/install-kokoro-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ download_file() {
rm -f "$tmp"

if command -v curl >/dev/null 2>&1; then
curl --fail --location --show-error --output "$tmp" "$url"
curl --fail --location --show-error --user-agent "codex-desktop-read-aloud" --output "$tmp" "$url"
elif command -v wget >/dev/null 2>&1; then
wget --output-document "$tmp" "$url"
wget --user-agent="codex-desktop-read-aloud" --output-document "$tmp" "$url"
else
"$python_bin" - "$url" "$tmp" <<'PY'
import sys
import urllib.request
urllib.request.urlretrieve(sys.argv[1], sys.argv[2])
request = urllib.request.Request(sys.argv[1], headers={"User-Agent": "codex-desktop-read-aloud"})
with urllib.request.urlopen(request) as response, open(sys.argv[2], "wb") as output:
output.write(response.read())
PY
fi

Expand Down
Loading
Loading