Repository navigation
Description
Context
Part of #54. Personas (#3617, PR #3955) can now be created, edited and selected in Settings → Voice. The only way to hear one, though, is to start a real live conversation with it. The maintainer requests a preview: hear a persona speak a phrase from the persona list and from the editor while adding or editing one, with a customizable phrase.
Source navigation checked at main 40dbae0a2f332eb20c52c2a967611894ca30d289:
PersonaSettings,packages/ui-react/src/components/settings/persona-settings.tsx:49, holds the Persona group. Its doc comment (persona-settings.tsx:43-45) states that the group "never opens the microphone or a provider". A preview changes that promise, so the new boundary has to be designed rather than assumed.PersonaList,persona-settings.tsx:236, andPersonaEditor, rendered atpersona-settings.tsx:178, are the two surfaces that get the control. The editorDrafttype ispersona-settings.tsx:31(name,voices,instructions).createVoicePersonaRoutes,packages/ui-server/src/routes/voice-personas.ts:56, holds the persona routes, each gated byhuman(principal). Writes to/settings/voicealso passisLiveSettingsWriter(voice-personas.ts:125).standardPersona,packages/ui-server/src/voice/personas.ts:107, builds the built-in Standard persona.parsePersona(personas.ts:85) andpersonaFieldsInvalid(personas.ts:62) validate an authored persona.- The live adapters only speak inside a full live session:
gemini-conversation.tsandgpt-live-conversation.tsunderpackages/ui-server/src/voice/. There is no one-shot speech-synthesis path.LiveConversationProviderinpackages/ui-sdk/src/server/conversation.tshas no preview or synthesis method.
Scope
- Persona list: add a preview control on each row, including Standard. It plays the preview phrase in that persona's effective voice for a chosen service: the persona's saved voice, or the service default, named as such.
- Editor: add a preview control that uses the unsaved draft, so a voice or instructions change can be heard before saving.
- The preview never writes the persona.
- It never changes the selection.
- Customizable phrase: a text field holding the phrase to preview, prefilled with a short default. Each authored persona stores its own optional preview phrase in its Markdown frontmatter, separate from the body used as “How it speaks”. Missing or blank phrases use the generic default below. Existing personas remain valid without the new field.
- Server side: an isolated, short-lived session with the selected actual live service/model/voice. Include the persona’s instructions (the unsaved draft in the editor), and gate spending with owner authorization. Never reuse or modify a real conversation or its provider-facing history.
Out of scope
- Voice cloning.
- New speech providers.
- Changing live-conversation behaviour, Start-card disclosure or provider-facing history.
- Any persona content in the agent's history.
- Qualifying how a voice actually sounds. A preview is a user aid, not a qualification receipt.
- Paid listening experiments by agents.
Maintainer rulings — 2026-11-11
These rulings supersede the earlier design comment wherever they differ.
- P1 — actual live service: each preview uses an isolated session with the selected actual live model and voice. Ask it to read the phrase, but do not promise verbatim recitation. Dedicated TTS/sibling models and automatic voice-only degradation are not selected. No microphone, chat history, brain orientation, host tools or additional brain content enters the preview. The preview operation is bounded and cancellable, and never touches an active conversation.
- P2 — include instructions: send the phrase, voice and the persona’s “How it speaks” instructions; use the unsaved draft when editing. Disclose this before Preview and identify the billed service. Instructions affect delivery at the model’s discretion; do not silently drop them.
- P3 — per-persona Markdown: store each authored persona’s phrase in its own Markdown frontmatter, with backward-compatible optional-field semantics. Keep it separate from instructions; ordinary live Start must not receive the preview phrase as persona instructions. A preview request never saves the persona, its phrase or its selection. Only an explicit save persists edits, using the existing revision/conflict and anchored-file rules.
- Generic shipped default: “The quick brown fox jumps over the lazy dog. One, two, three. Testing, testing.” The product’s default phrase uses no Odysseus fixture/demo content. Missing/blank authored phrases use this default. Fixture/demo content remains separately governed by the existing corpus rules.
- P4 — limits: owner-only; at most 500 UTF-8 bytes after trimming; 30 seconds of audio; 10 preview starts per minute per brain. A new preview stops and aborts the previous one. Disable previews during a live conversation. Enforce authorization and limits server-side, report truncation/rate limits visibly, and close the isolated provider session on completion, cancellation or failure.
- P5 — implementation split: create a separate ui-kit prerequisite issue for the preview components and Storybook states, followed by server/SDK/UI integration in this issue.
- P6 — review: the implementing agent verifies the stories against the agreed design and browser/accessibility checks. No separate mandatory maintainer visual sign-off blocks integration.
Final interaction rulings
- Phrase editing: only the persona editor edits the phrase; its existing explicit Save/Cancel controls persist or discard the draft. List buttons play each persona’s saved phrase. There is no list phrase editor or separate inline save flow.
- Standard: stays built in and fileless, with the fixed generic default. No temporary override, Markdown file or Standard-only brain setting is added.
- Service choice: preselect the saved live service and expose a “Hear on” picker. An absent/unavailable default leaves Preview disabled until the owner explicitly chooses an available service. This choice is for previews only and does not change the saved live default. A stale/invalid voice, over-limit instructions, unregistered service or failed key yields a visible refusal; never substitute a service or voice, and never truncate instructions. Use the selected provider’s actual instruction-byte cap.
- Playback: retain the proposed idle/loading/playing/stopped/error/unavailable/rate-limited states, Stop while loading or playing, a single preview at a time, cancellation on replacement or leaving Settings/editor, and the visible 30-second truncation reason. A real live conversation disables previews. Preserve keyboard/status/reason descriptions, 44px targets, 320px legibility and reduced-motion presentation.
- Disclosure: “Preview sends this persona’s phrase, voice and ‘How it speaks’ to . No microphone or chat history. Billed by .” An isolated live model may paraphrase; do not imply exact recitation or guaranteed instruction obedience.
The earlier phone/desktop design is superseded where it assumes a shared editable list phrase, per-device storage, 200-byte/15-second limits, dedicated TTS or automatic service fallback. All remaining states use the existing kit language and the rulings above.
Placement at 320px (the service/disclosure panel is shared; phrase editing appears only in the editor):
Persona list Persona editor
Hear on [saved service v] Name / Voice / How it speaks
Sends this persona’s phrase, Preview phrase
voice and How it speaks… [generic or authored phrase]
Standard [>] <UTF-8 bytes> / 500 [Reset]
built in · generic phrase [Preview draft / Stop]
Penelope [>] […] Unsaved preview saves nothing.
saved voice [Save] [Cancel]
At desktop the same control order and behavior hold: service/disclosure above list rows; the phrase/draft-preview panel beside the editor instructions. The finished stories establish the responsive layout and all failure states; the agent verifies them without a mandatory separate maintainer sign-off.
Acceptance criteria
- Consume the completed ui-kit prerequisite and implement the final list/editor interaction above, including the 320px/desktop states and accessible descriptions. All maintainer decisions are recorded; do not implement superseded parts of the original proposal.
- Each persona row, Standard included, can play the preview phrase in its effective voice for the chosen service, and names a default voice as the default.
- The editor previews unsaved voice, instructions and phrase together. Neither list nor draft preview writes any persona bytes, phrase, selection or saved live-service setting. Only editor Save persists phrase edits, with the existing revision/conflict handling; Cancel discards them.
- Each authored persona’s optional preview phrase round-trips through Markdown and the persona read/create/update/draft API, is bounded to 500 UTF-8 bytes, and is separate from live instructions. Missing/blank values use the generic testing default; existing files remain valid. An older client omitting the field on update does not erase an existing phrase. Standard always uses the fixed generic default and gets no file/override setting.
- A preview sends exactly what the design discloses, and never touches the microphone, chat history or an active conversation.
- Owner authorization, the 500-byte phrase limit, 30-second audio cap and 10-starts/minute/brain limit are enforced server-side. Refusals, truncation and retry timing are visible; stop/replacement/disconnect closes the isolated session.
- The “Hear on” picker follows the final service-choice rule. An absent/unavailable default requires an explicit choice; a failed key, invalid/stale voice or over-limit instructions is visible and never substitutes a service/voice or silently removes/truncates instructions.
- Documentation covers the isolated live preview, exactly what it sends, the generic/per-persona phrase, its limits, and provider billing without implying a known price or guaranteed recitation.
Verification
- Keyless server/SDK tests with local adapter doubles, covering what is sent per preview, authorization, limits, and failure without substitution.
- Real browser tests in Settings → Voice at 320px and desktop for list saved-phrase playback, draft-only preview, editor Save/Cancel/reset, Standard’s fixed generic phrase, service choice, lifecycle/stop/errors and active-conversation exclusion. No list phrase editor exists.
- Failing-first or mutation evidence for the no-write and no-substitution guards. Also prove missing-field compatibility/preservation, exact UTF-8 limits, per-persona phrase isolation, and that the preview phrase never becomes ordinary-live instructions. Exercise authorization, rate/audio bounds and provider-session closure with offline doubles.
- No real provider calls in tests.
Contract impact
Additive inventory:
- A bounded owner-only preview route and any optional preview operation/capability on the existing live-provider seam. Both existing live services are plausible implementations; do not introduce a standalone TTS provider or change ordinary
open()behavior. - An optional per-persona Markdown frontmatter phrase field and corresponding persona read/write/draft DTO fields. These are compatibility-contract changes: absent remains valid, preview does not write, and the field is never appended to ordinary live instructions.
- No device-local phrase storage, brain-wide phrase setting or Standard-only override. Preserve file schema compatibility and keep phrase text out of ordinary live instructions.
Inventory the preview route request/audio/completion/error shapes, provider capability, persona fields and new public exports in the relevant docs/integration-contract/ components in the same CONTRACT: commit. Preserve old callers/files and include a minor changeset. The chosen scope is additive; a breaking proposal needs a separate ruling first.
2026-11-11: folded all final maintainer rulings into the current specification, including editor-only phrase saves, Standard’s fixed generic default and saved-service preselection with an explicit-choice fallback boundary. Implementation remains open and unscheduled.
Dependencies and delivery slices
Blocked by #3981
#3981 supplies the preview components and reviewed Storybook/browser states. This issue then owns the actual-live preview operation, route, persona phrase storage/DTOs and app integration. The full deliverable remains part of #54.
The durable decision record is tracked in #3982; that documentation task is not an implementation prerequisite. Both tasks and this issue are wanted but unscheduled (priority: p2); no release milestone is inferred.
Activity
schlessera commentedon Nov 11, 2026
Design needed: interaction and boundary design for persona preview.
Already decided:
Still open:
The code can't settle these, because each option changes what the user hears, pays for and is told before a provider is contacted.
schlessera commentedon Nov 11, 2026
Design: persona voice preview (list and editor)
Summary.
PersonaSettingschanges from "never opens a provider" to "opens a provider only for a preview you start, and never opens the microphone".Example: the persona Penelope (Gemini voice
Kore, with "How it speaks": "Measured and warm, a little wry; pause before names.").1. Mechanism → (b) one-shot synthesis, recommended
open()(no conversation, no history)Why (b): a preview has to say this phrase, and only a synthesis call guarantees that.
The new seam is optional:
Justifying it. ROADMAP allows a new seam only with a plausible second implementation, and it has two: Gemini's speech models and OpenAI's TTS models both take their live voices' ids, and both take style prompts.
previewInstructions: "unsupported", and the control's note says "voice only; How it speaks isn't applied".2. What is sent
The phrase, the voice id, and the persona's "How it speaks" text (the unsaved draft in the editor). Nothing else is sent: no history, no orientation, no microphone audio, no brain content.
Disclosure text, shown once under the phrase field and referenced by every preview button through
aria-describedby:When the service doesn't apply instructions: "…sends this phrase and the voice to Gemini. "How it speaks" isn't applied in previews." The disclosure never says "free": cost is unknown, so it reads "Billed by <service>".
3. Limits
truncated: true. The player shows "Stopped at 15 s".human(principal)plusisLiveSettingsWriter), because a preview spends the owner's provider budget. Non-owners don't see the control, and the server refuses with 403.4. Phrase storage → per device, recommended
localStorageunder a key scoped to the brain. This needs no contract field, and no persona content leaks into Markdown.5. Which service, S3b and S3c
Gemini · default voice (Puck).6. Control states
IconButton(md, 44 px), with the name and state below.VoiceMeterand elapsed timeCalloutunder the rowrole="alert"with the reasonaria-describedbyset to the reasonMocks
Persona list, 320 px
Persona list, desktop
Editor, 320 px (the panel sits under "How it speaks" and uses the draft)
Editor, desktop: the same panel as a two-column block next to "How it speaks". States as listed:
Contract inventory (additive)
LiveConversationProvider.previewSpeech?andpreviewInstructions?(above), validated inassertLiveConversationProvider. If a provider declares one, it must have persona support.ConversationProfile.preview?: { instructions: "supported" | "unsupported" }. Absent means no preview.POST /voice/personas/preview.{ providerId, phrase, source: { personaId } | { draft: { voice?, instructions } } }.audio/L16body; the rate is in the header, plusX-Preview-Truncated.human(principal)andisLiveSettingsWriter. Never writes.PREVIEW_UNAVAILABLE,PREVIEW_VOICE_INVALID,PREVIEW_INSTRUCTIONS_TOO_LONG,PREVIEW_PHRASE_TOO_LONG,PREVIEW_RATE_LIMITED(+retryAfter),PREVIEW_PROVIDER_FAILED.docs/integration-contract.md(Live conversation → Preview),voice-permission.md(what a preview sends), and the doc comment onPersonaSettings.open(), the Start card, the history envelope, persona Markdown (unless P3 rules for a per-persona phrase).ui-kit inventory (Storybook first)
IconButton,Button,TextButton,Callout,VoiceMeter,VoiceNotice(for the disclosure text).VoicePreviewButton: propsstate,nameandreason?, covering the 7 states above.VoicePreviewPanel: phrase field, counter, Reset, "Hear on" select and disclosure. It has avariantoflistordraft.Open questions for the maintainer
previewSpeechseam?VoicePreviewButton,VoicePreviewPaneland their stories) that blocks the integration in this one?schlessera commentedon Nov 11, 2026
Decision (maintainer, 2026-11-11):
The body now reflects these rulings and their additive contract implications. Three follow-up choices are being settled: phrase editing placement, built-in Standard’s fileless phrase, and initial service selection.
needs: decisionstays until those are answered.schlessera commentedon Nov 11, 2026
Decision (maintainer, 2026-11-11): The remaining voice-preview choices are settled.
The body now consolidates these choices with the earlier rulings: actual isolated live service, instructions included, per-persona Markdown phrases, 500-byte/30-second/10-starts-per-minute bounds, owner authorization, and agent-verified stories without a mandatory human sign-off. It includes the resulting UI placement, compatibility requirements and verification.
The approved component split is #3981, a native child of #54; keep
blockeduntil it delivers. #3982 tracks the durable decision record and does not block implementation. The desired work is unscheduled, so classify this issue aspriority: p2without a milestone. Removeneeds: decision, addagent-ready, and retain the real component dependency.