Repository navigation
Description
Part of #3705.
Context
The maintainer has requested selectable dictation providers and Gemini 3.5 Transcribe Live. The epic holds the upstream evidence and binding rules. Source pointers verified on main a63e564f02f9b1ab0462bb0ac02dbf8ea6eacee7 on 2026-11-08; verify named anchors again at pickup.
Current seams are (SpeechProvider, packages/ui-sdk/src/server/speech.ts:26-43), (AsrClient, packages/ui-sdk/src/client/asr.ts:21-30) and (createAsrClientRegistry, packages/ui-sdk/src/client/asr.ts:41-65). Selection is (pickSpeechProvider, packages/ui-server/src/voice/speech-providers.ts:127-155), and capture consumes (const start, packages/ui-react/src/voice/use-dictation.ts:52-123). The Settings frame is (SECTIONS, packages/ui-react/src/components/settings/settings-panel.tsx:27-37); #3616/#3617 establish the Voice destination and #3690 owns presentation. Existing operational preference storage is (getSetting, packages/ui-server/src/db/settings.ts:26-47). Track mapping is (Voice:, scripts/sync-project.ts:80-80).
Scope
Produce the source-backed integration/interaction design and durable decision amendment for this epic, before runtime implementation. Use the already verified dedicated gemini-3.5-transcribe-live API rather than transcription attached to a conversational audio model.
Specify:
- Multi-provider registration/discovery through existing seams, ids/duplicates, legacy by-value/
VOICE_PROVIDERmigration, explicit/saved/host default precedence, unavailable choices and zero/one/multiple-provider cases. Define authorization, persisted preference scope, revision/concurrent edits and exact additive HTTP/client schemas. Keep the prior live-provider setting independent. - Selection/disclosure for a live dictation take and saved-recording upload: freeze the disclosed provider across asynchronous start, token mint, capability reads and any receipt/retry. No Settings save can retarget an active take or silently route saved audio to another service.
- A Gemini
SpeechProviderplus matchingAsrClient: server-held long-lived key; constrained ephemeral token/model/config, expiry/uses/resumption semantics; actual browser WebSocket auth; PCM capture/resampling/chunk bounds; interim/final mapping, endpointing and bounded drain/stop/error/cancel cleanup. Inspect the current SDK/dependencies or use the documented wire protocol; do not invent an SDK version/API. - SMART/VERBATIM configuration and disclosure, vocabulary/language bounds, final-text/inline-correction semantics and any remaining maintainer choices. Include SMART in the selected feature scope; do not assume it grants command authority or silently changes other providers' output.
- Settings/pre-capture/error and saved-audio-unsupported flows at 320px/desktop, coordinated with the Voice pane and Epic: unified voice experience — one mic, one field (dictation + live conversation) #3690 without a circular dependency. Draw how zero/one/multiple and stale/default changes behave; using existing presentation until Epic: unified voice experience — one mic, one field (dictation + live conversation) #3690 lands is acceptable.
- Exact contract/code/test ownership and compatibility matrix. Update the dependent issue briefs with the approved outputs; unresolved product/architecture rulings must stay explicit
needs:labels rather than becoming implied approvals.
Append the resulting decision to docs/decisions/dictation-speech.md or a focused linked record/index entry. Seed #3705 into the Voice epic mapping in scripts/sync-project.ts, preserving existing assignments.
Out of scope
Runtime Gemini/registry/UI implementation, new seams/packages or dependencies, paid calls/credentials, deployment, broad voice redesign, TTS/conversation features and Gemini saved-file transcription.
Acceptance criteria
- A complete recommended design covers all six points with exact API/session/event/error examples, source evidence, alternatives and known limits; defaults and unsupported cases are explicit. Any required maintainer approval is distinguished from the proposal.
- It states which Google claims are documentation facts and which still need real-provider/device qualification. It does not promise parity with all Pixel/Rambler UI features or claim that saved files work because streaming does.
- It contains 320px/desktop mocks and state/compatibility tables, plus a bounded implementation/proof split matching the native children. Mandatory source citations resolve against inspected source.
- Selected decisions are recorded durably and folded into the downstream issue bodies; if review/choices remain, record exact next questions and preserve their prerequisite/readiness state. Closing this investigation alone is not approval of an unresolved choice.
- The epic is added to the Voice track mapping, with focused project-sync regression proof and no terminal
--applyracing the workflow.
Verification
Inspect the exact Google docs linked by the epic and installed dependency declarations; no paid network call. Review the schema/mocks against the dictation, voice-permission, history and offline/saved-recording decisions. Run applicable documentation/lint/citation checks and bun run test tests/project-sync-main.test.ts tests/project-sync-item.test.ts for the mapping, plus required PR preflight before a PR.
Contract impact
Design and board mapping only. Propose contract changes explicitly, but do not claim runtime/schema additions have shipped. A later supported change needs CONTRACT:, same-commit authoritative documentation and an appropriate minor changeset; any break needs a maintainer ruling first.
Activity
schlessera commentedon Nov 8, 2026
The requested outcome is selected dictation providers plus Gemini 3.5 Transcribe Live, including SMART transcription. The remaining work is the concrete compatibility/transport/selection and Settings design; the investigation produces that proposal and must distinguish any unresolved ruling from approval.
schlessera commentedon Nov 8, 2026
Claiming for implementation (claim token
wi-3706-d12e), branchdocs/3706-dictation-provider-design. Collision scan on the cited paths reports closure-only overlaps with unrelated draft PRs; no path collisions.schlessera commentedon Nov 8, 2026
Maintainer decision, 2026-11-08:
GEMINI_API_KEYis set. It never becomes the default on that basis alone, unless it is the only registered provider.Recorded in
docs/decisions/dictation-speech.md. The design is indocs/plans/selectable-dictation.md(#3713).schlessera commentedon Nov 8, 2026
Delivered by #3713, squash
a3ca546on main, milestone 0.45.0. It adds the design plandocs/plans/selectable-dictation.md, records rulings D1–D4 indocs/decisions/dictation-speech.md, and puts #3705 on the Voice track with a project-sync regression test. Mutation receipt: removing 3705 from the mapping fails the new test (Expected "Voice", Received undefined). The downstream briefs #3707–#3710 now include the approved design.Correction found in implementation review: §6's example token request used SDK option names (
liveConnectConstraints,lockAdditionalFields). The REST wire usesbidiGenerateContentSetupandfieldMask, as@google/genai2.24.0's own serializer shows. §4 also wrongly called legacyVOICE_PROVIDERmisconfiguration a construction error; it stays a route-time 500. Both are corrected in the implementation PRs.