Skip to content

Voice: pronunciations, so a client can say how a word is said - #26

Merged
cjus merged 1 commit into
mainfrom
claude/voice-pronunciations
Nov 11, 2026
Merged

cjus merged 1 commit into
mainfrom
claude/voice-pronunciations

Conversation

@cjus

@cjus cjus commented Nov 11, 2026

Copy link
Copy Markdown
Owner

What

A voice node's model may get a word wrong that the client knows how to say: a player's name, an opening's. This adds pronunciations to voice/speak, behind a new capability of the same name, so the client says the word's sounds (IPA) instead of the voice node knowing the client's domain.

  • voice/speak takes pronunciations: an array of {"word", "ipa"}; the node says each word as given wherever it appears in text (whole words, case-insensitive).
  • Each request carries its own entries, as hotwords do, so a request stands alone (rule 3) and the node keeps no list.
  • An empty word or ipa, or one with a space or a line break, is InvalidParams; a node MAY refuse more entries than it can take. A node that has no phoneme for a symbol ignores that entry, so one entry never silences a reply.
  • A node without the capability ignores the field.

Why

cjus/chessgui#539 (Mac App Store build) needs a voice with no eSpeak NG (GPL) in it. A listening test of a patched build (blind, current voice against patched, 16 sentences) came out level once plurals/verb endings were handled and a list of player and opening names was given. The names belong in Solrac, not in the voice module (audio-chat-box's rule), and this is the field Solrac sends them in.

Checks

cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test, RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps and cargo deny check pass locally. New: a round-trip test (a plain request leaves the field out), a spec example, and the conformance session voice/pronunciations-bad-params (needs voice.pronunciations; skipped for nodes without it, so no existing node changes status).

For the maintainer

A minor version adding optional fields and a capability (rule 2), recorded in the spec's Changes. Open choice: IPA as the notation (any node maps it to its own symbols) against a node-specific one; IPA keeps the protocol node-independent. Draft until you agree; audio-chat-box and Solrac follow once this merges and their pins move.

🤖 Generated with Claude Code

…nciations)

A client can say how a word the node's model may get wrong is said, in IPA,
so a voice node need not know a client's names. Each request carries its own
entries (requests stand alone); an entry the node can't say is ignored; a
malformed one is InvalidParams. Optional, so a node or client that doesn't
know it is unaffected (cjus/chessgui#539).

Spec 8, 8.2 and 14, the cnp types, a round-trip test and a conformance
session for the bad-params rule.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cjus
cjus marked this pull request as ready for review November 11, 2026 23:07
@cjus
cjus merged commit 2409b9b into main Nov 11, 2026
2 checks passed
@cjus
cjus deleted the claude/voice-pronunciations branch November 11, 2026 23:08
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