feat(cli): talk test --toast sends a test desktop notification

Notifications could only be tried through an active quiet window with
quiet_mode = toast and a daemon restart. `talk test --toast` sends a test
notification directly through the same notify path, reports the tool
(notify-send / Notification Center / Windows toast) and the result, and
exits 1 with a hint when no tool exists or the call fails.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
m3ta-chironandClaude Fable 5.1 committed 2026-10-24 11:55:24 +02:00
1 parent 1b971bc3f6
commit 6f3e7c9f35
5 files changed
+83 -5

No files matched your search

+6 -3
View File
@@ -22,7 +22,7 @@ dependencies.
| `talk cancel` | cancel the playing and all queued announcements |
| `talk daemon run\|start\|stop` | run the daemon in the foreground / start it in the background / stop it (normally not needed, see below) |
| `talk voices` | known voices per provider and language, default marked (`--provider`, `--lang`, `--json`) |
| `talk test` | speak a test sentence; shows provider and timings (`--lang`, `--provider`, `--voice`) |
| `talk test` | speak a test sentence; shows provider and timings (`--lang`, `--provider`, `--voice`); `--toast` sends a test notification instead |
| `talk doctor` | self-diagnosis: config, daemon, audio, providers, notifications, mute, laws (`--probe`, `--json`) |
| `talk setup` | first-time setup in a few questions: language, voices with preview, quiet hours, config.toml |
@@ -78,7 +78,9 @@ Keys never go into config.toml.
- **`talk test`** speaks a fixed test sentence directly in this process (not
via the daemon; mute and quiet hours do not apply here, an active mute is
mentioned) and shows which tier spoke and how long synthesis and playback
took.
took. `talk test --toast` sends a test desktop notification through the
same path `quiet_mode = toast` uses, so you can check notifications
without a quiet window or a daemon restart.
- **`talk voices`** lists the curated voice catalog (ElevenLabs premade,
OpenAI, Edge neural voices per locale) as a table; `*` marks the voice
talk uses without `--voice` (config `voice.<provider>.<lang>` or the
@@ -184,7 +186,8 @@ high (burst is a rate right, not a quiet right):
- `quiet_mode = "toast"`: a desktop notification instead of audio, through
the system's own tools (Linux `notify-send`, macOS Notification Center,
Windows toast), best effort: if the tool is missing, only the log line
remains and `talk doctor` shows it under "Toast".
remains and `talk doctor` shows it under "Toast". Try it with
`talk test --toast`.
- `now:true` **breaks out of quiet hours too** (a deliberate interruption).
**Length and age:** two more laws against what prompts like to do, reading