Chat voice selector: favourites, workspace mapping, 3-state mode toggle #28

Closed
opened 2026-10-31 00:01:31 +00:00 by dsh · 4 comments
Owner

Picking a voice from the chat composer, and the mode toggle next to it.

Engine selector stays

Correction to an earlier review note: the settings keep the engine selector. Three engines (Piper / Kokoro / Phonon) with different voice sets and different download/config paths — engine is a legitimate configuration axis there.

The invalid-state problem does not exist because the chat selector lists favourites only, and a favourite is an (engine, voice) pair. Picking a favourite implies its engine. No cross-product, no validation code.

Favourites

  • Settings: mark voices as favourites. Only favourites appear in the composer selector.
  • The composer chip shows the effective voice, never "default".
  • Per-workspace voice mapping: workspace A always sounds like X, so the source is recognisable by ear. This is the companion to wn_speak source attribution.

Precedence (three levels, explicit)

settings default → workspace default → session override (what the composer selector sets, sticky).

Voice is identity, not a per-message parameter. Do not put a voice selector on individual messages — it would break "hear who is talking". The composer selector is session-scoped.

Mode toggle

  • Three states: off → auto → tool, click cycles. Settings choose the starting state.
  • Two colours: green = auto-read, blue = tooltalk. Glow when active.
  • Micro-label next to it (Auto Read / Tool) in tiny type, so the control does not inherit its meaning from a setting elsewhere.
  • A toggle whose meaning depends on a distant setting is the known trap here; the label is the fix.

Acceptance

  1. A favourite voice can be picked in the composer and applies to the rest of the session.
  2. Selecting it sets the engine implicitly; settings still expose the engine selector.
  3. Toggle cycles three states, colours match, label matches, and reloading restores the configured start state.
  4. Workspace mapping overrides the settings default; session override beats both.
Picking a voice from the chat composer, and the mode toggle next to it. ## Engine selector stays Correction to an earlier review note: the **settings keep the engine selector**. Three engines (Piper / Kokoro / Phonon) with different voice sets and different download/config paths — engine is a legitimate configuration axis there. The invalid-state problem does not exist because **the chat selector lists favourites only**, and a favourite is an `(engine, voice)` pair. Picking a favourite implies its engine. No cross-product, no validation code. ## Favourites - Settings: mark voices as favourites. Only favourites appear in the composer selector. - The composer chip shows the **effective** voice, never "default". - Per-workspace voice mapping: workspace A always sounds like X, so the source is recognisable by ear. This is the companion to `wn_speak` source attribution. ## Precedence (three levels, explicit) `settings default` → `workspace default` → `session override` (what the composer selector sets, sticky). **Voice is identity, not a per-message parameter.** Do not put a voice selector on individual messages — it would break "hear who is talking". The composer selector is session-scoped. ## Mode toggle - **Three states**: `off → auto → tool`, click cycles. Settings choose the starting state. - Two colours: **green = auto-read**, **blue = tooltalk**. Glow when active. - Micro-label next to it (`Auto Read` / `Tool`) in tiny type, so the control does not inherit its meaning from a setting elsewhere. - A toggle whose meaning depends on a distant setting is the known trap here; the label is the fix. ## Acceptance 1. A favourite voice can be picked in the composer and applies to the rest of the session. 2. Selecting it sets the engine implicitly; settings still expose the engine selector. 3. Toggle cycles three states, colours match, label matches, and reloading restores the configured start state. 4. Workspace mapping overrides the settings default; session override beats both.
Author
Owner

Feasibility review: the UI/state model is right, but engine switching is the hidden cost.

  • Favourites as (engine, voice) pairs are clean and remove cross-product validation. The composer chip (effective voice) is a good call.
  • Precedence settings → workspace → session is straightforward within one engine. Across engines it means tearing down/rebuilding a worker and reloading a 63–92 MB model mid-session. Keeping all three engines warm is memory-hostile (Piper 63 MB + Kokoro 92 MB + Phonon 65 MB, plus workers).
  • Options: (1) v0.1.0 restricts the composer/workspace mapping to the active engine's favourites, engine changes only in settings; (2) allow cross-engine but switch lazily and show a short “loading voice…” state, never silently; (3) keep the last-used engine per workspace warm and cap at two. I'd ship (1) first, then measure before (2).
  • Three-state mode: off → auto → tool needs a settings migration from the current autoRead: boolean. tool only exists after #27; until then cycle off ↔ auto and leave tool disabled rather than pretending.
  • Composer placement is feasible in conversation.input.left/.right; please keep the tiny text label (Auto Read / Tool) — the colour-only toggle would be a usability trap.

Sequencing: #29 (delete) and the #27 tool spike both touch this state; I'd land the mode migration + favourites within the active engine first, then add workspace/tool once #27 is proven.

**Feasibility review:** the UI/state model is right, but **engine switching is the hidden cost**. - Favourites as `(engine, voice)` pairs are clean and remove cross-product validation. The composer chip (effective voice) is a good call. - Precedence settings → workspace → session is straightforward **within one engine**. Across engines it means tearing down/rebuilding a worker and reloading a 63–92 MB model mid-session. Keeping all three engines warm is memory-hostile (Piper 63 MB + Kokoro 92 MB + Phonon 65 MB, plus workers). - Options: (1) v0.1.0 restricts the composer/workspace mapping to the **active engine's** favourites, engine changes only in settings; (2) allow cross-engine but switch lazily and show a short “loading voice…” state, never silently; (3) keep the last-used engine per workspace warm and cap at two. I'd ship (1) first, then measure before (2). - Three-state mode: `off → auto → tool` needs a settings migration from the current `autoRead: boolean`. `tool` only exists after #27; until then cycle `off ↔ auto` and leave `tool` disabled rather than pretending. - Composer placement is feasible in `conversation.input.left`/`.right`; please keep the tiny text label (`Auto Read` / `Tool`) — the colour-only toggle would be a usability trap. Sequencing: #29 (delete) and the #27 tool spike both touch this state; I'd land the mode migration + favourites within the active engine first, then add workspace/tool once #27 is proven.
Author
Owner

Refined composer/voice spec (operator, 2026-11-04).

  • The composer speaker control becomes a 3-state mode cycle with the state spelled out next to it:
    • read aloud — auto-read every finished reply (current behaviour) — green;
    • tool-speak — only wn_speak announcements are spoken, auto-read is off — blue;
    • silent — nothing is spoken; announcements are still collected in the noise panel (#32), just muted — dim/neutral;
    • keep the label text (Read aloud, Tool-speak, Silent) for accessibility/clarity, not colour alone.
  • To the right of the mode button: a voice selector in the composer. Shows the user's favourite voices (starred in Settings → Whale Noises); picking one applies it to the current workspace/session.
  • Per-project voices are required: the selected voice is tied to the session's workspace (ctx.sessions projects cwd; key the mapping by workspace cwd), so e.g. the PAD project can be de_DE-glados-medium ("GLaDeeps") while the default stays the operator's go-to LibriTTS voice 0. Resolution order: workspace mapping → global default voice. Both announcements and auto-read use the resolved voice.
  • Settings needs favourites management (star/unstar in the existing searchable 900+ voice list) + a list of workspace→voice overrides with a way to clear an override back to default.
  • Voice catalogue: LibriTTS is searchable (904 voices) and Phonon's q8 quality is a keeper; a possible Phonon/LibriTTS experiment is out of scope here.

Related: #27 keeps the protocol/queue work (announce preempting report, tool-speak gating, debug-log removal); the persistent tray is #32.

**Refined composer/voice spec (operator, 2026-11-04).** - The composer speaker control becomes a **3-state mode cycle** with the state spelled out next to it: - **read aloud** — auto-read every finished reply (current behaviour) — *green*; - **tool-speak** — only `wn_speak` announcements are spoken, auto-read is off — *blue*; - **silent** — nothing is spoken; announcements are still collected in the noise panel (#32), just muted — *dim/neutral*; - keep the label text (`Read aloud`, `Tool-speak`, `Silent`) for accessibility/clarity, not colour alone. - **To the right of the mode button: a voice selector in the composer.** Shows the user's **favourite voices** (starred in Settings → Whale Noises); picking one applies it to the current **workspace/session**. - **Per-project voices are required:** the selected voice is tied to the session's workspace (`ctx.sessions` projects `cwd`; key the mapping by workspace cwd), so e.g. the PAD project can be `de_DE-glados-medium` ("GLaDeeps") while the default stays the operator's go-to LibriTTS voice 0. Resolution order: workspace mapping → global default voice. Both announcements and auto-read use the resolved voice. - Settings needs favourites management (star/unstar in the existing searchable 900+ voice list) + a list of workspace→voice overrides with a way to clear an override back to default. - Voice catalogue: LibriTTS is searchable (904 voices) and Phonon's q8 quality is a keeper; a possible Phonon/LibriTTS experiment is out of scope here. Related: #27 keeps the protocol/queue work (`announce` preempting `report`, tool-speak gating, debug-log removal); the persistent tray is #32.
Author
Owner

Slice 3a landed (e820477): the 3-state voice mode.

  • Composer control is now a cycle — green Read aloud → blue Tool-talk → dim Silent → back — with the state spelled out in a 28px pill next to the icon. Verified in the CDP test DSH on desktop and at 390px mobile.
  • Semantics: read speaks every completed reply + announcements; tool-talk speaks only wn_speak; silent speaks nothing, but still collects every note in the tool-talk panel (the panel is the record). Announcement handling short-circuits after recording; auto-read only runs in read mode.
  • Settings gained a Voice mode select; legacy autoRead: true/false settings migrate to read/tool so nobody's behaviour changes on upgrade.
  • 192 tests, npm run check green. Screenshots: docs/design/voice-mode-composer.png, voice-mode-mobile.png.

Remaining slice 3b: favourite voices (star in settings), composer voice picker, per-workspace voice mapping (PAD → GLaDOS, default → LibriTTS 0) — this needs per-item engine multiplexing because the mapping crosses engines (Piper vs LibriTTS), with model/worker switching at speak time.

**Slice 3a landed (`e820477`): the 3-state voice mode.** - Composer control is now a cycle — green **Read aloud** → blue **Tool-talk** → dim **Silent** → back — with the state spelled out in a 28px pill next to the icon. Verified in the CDP test DSH on desktop and at 390px mobile. - Semantics: *read* speaks every completed reply + announcements; *tool-talk* speaks only `wn_speak`; *silent* speaks nothing, but still collects every note in the tool-talk panel (the panel is the record). Announcement handling short-circuits after recording; auto-read only runs in read mode. - Settings gained a **Voice mode** select; legacy `autoRead: true/false` settings migrate to `read`/`tool` so nobody's behaviour changes on upgrade. - 192 tests, `npm run check` green. Screenshots: `docs/design/voice-mode-composer.png`, `voice-mode-mobile.png`. **Remaining slice 3b:** favourite voices (star in settings), composer voice picker, per-workspace voice mapping (PAD → GLaDOS, default → LibriTTS 0) — this needs per-item engine multiplexing because the mapping crosses engines (Piper vs LibriTTS), with model/worker switching at speak time.
Author
Owner

Slice 3b landed (cc76175) — #28 is complete.

  • Favourites: star/unstar the selected voice in Settings → Whale Noises; starred voices appear in the composer picker.
  • Composer voice picker next to the mode pill: shows the effective voice, lists starred (engine, voice) pairs, and stores the choice as a workspace override (session cwd) — sticky per project, Default entry clears it.
  • Precedence: workspace override → global default; used by announcements, auto-read, manual read-aloud and replay. (The old 'session override' level from the original issue was dropped in favour of the operator's later workspace-sticky spec.)
  • Cross-engine speech: one lazily created pipeline per engine (worker + queue + engine), routed per spool item, with one shared AudioContext. PAD can sound like Piper GLaDOS while the default is LibriTTS 0 — the feasibility review's warning was addressed via the lazy option rather than restricting to the active engine.
  • Settings: Favourite voices card (starred list, unstar current) and Project voices card (overrides + Clear).
  • Verified live over CDP: project mapped to de_DE-glados-medium, global default libritts:0; announcement handling, speak start, audio chunk and replay all reported engine=piper, voice=de_DE-glados-medium while settings.engine stayed libritts. Screenshots: voice-picker-glados.png, voice-settings-cards.png, voice-picker-mobile.png.
  • 196 tests, npm run check green.

Acceptance 1–4 satisfied. Remaining #27 leftovers (announce→report preemption, removing temporary debug logs) are tracked there — not part of this issue.

**Slice 3b landed (`cc76175`) — #28 is complete.** - **Favourites**: star/unstar the selected voice in Settings → Whale Noises; starred voices appear in the composer picker. - **Composer voice picker** next to the mode pill: shows the effective voice, lists starred `(engine, voice)` pairs, and stores the choice as a **workspace override** (session `cwd`) — sticky per project, Default entry clears it. - **Precedence**: workspace override → global default; used by announcements, auto-read, manual read-aloud and replay. (The old 'session override' level from the original issue was dropped in favour of the operator's later workspace-sticky spec.) - **Cross-engine speech**: one lazily created pipeline per engine (worker + queue + engine), routed per spool item, with one shared AudioContext. PAD can sound like Piper GLaDOS while the default is LibriTTS 0 — the feasibility review's warning was addressed via the lazy option rather than restricting to the active engine. - **Settings**: Favourite voices card (starred list, unstar current) and Project voices card (overrides + Clear). - **Verified live over CDP**: project mapped to `de_DE-glados-medium`, global default `libritts:0`; `announcement handling`, `speak start`, `audio chunk` and replay all reported `engine=piper, voice=de_DE-glados-medium` while `settings.engine` stayed `libritts`. Screenshots: `voice-picker-glados.png`, `voice-settings-cards.png`, `voice-picker-mobile.png`. - 196 tests, `npm run check` green. Acceptance 1–4 satisfied. Remaining #27 leftovers (announce→report preemption, removing temporary debug logs) are tracked there — not part of this issue.
dsh closed this issue 2026-11-05 00:52:13 +00:00
Sign in to join this conversation.
No description provided.