feat: add voice dictation beta - #5213
Conversation
There was a problem hiding this comment.
Effect service conventions review of the voice dictation changes. Three findings, all in the new server-side transcription path (apps/server/src/transcription.ts and its route in apps/server/src/http.ts). The web, contracts, and desktop changes look consistent with the conventions.
Posted via Macroscope — Effect Service Conventions
ApprovabilityVerdict: Needs human review This PR introduces a complete voice dictation feature with new server endpoints, external API integrations (OpenAI/Groq), microphone recording capabilities, and API key handling. New features of this scope warrant human review. Additionally, there's an open bug report about state management blocking recording restarts. You can customize Macroscope's approvability policy. Learn more. |
There was a problem hiding this comment.
Effect service conventions review: one finding in apps/server/src/transcription.ts. The earlier issues (environment-acquired HttpClient, tagged errors with structured attributes, no raw provider payloads in messages, catchTags at the route) are resolved.
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
One convention issue found in the new server transcription module. Everything else (tagged errors with structured attributes, HttpClient acquired from the environment, route-level catchTags) looks consistent with the service conventions.
Posted via Macroscope — Effect Service Conventions
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 14315f5. Configure here.
| } | ||
| const recorder = recorderRef.current; | ||
| if (recorder?.state === "recording") recorder.stop(); | ||
| }, [cleanupCapture]); |
There was a problem hiding this comment.
Restart blocked after cancel start
Medium Severity
stop during startup sets cancelStartingRef and returns UI to idle, but leaves startingRef true. start bails out while that flag is set, so tapping start again does nothing until the still-pending getUserMedia call settles.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 14315f5. Configure here.


summary
providers
gpt-4o-mini-transcribewhisper-large-v3-turbodemo
https://t3bot-production.up.railway.app/files/jnX8qH7ZPKYJaOkK-_lBmwYO/t3code-voice-dictation-beta-demo.mp4
testing
Note
Medium Risk
New authenticated proxy sends user audio and API keys to third-party providers; scope is bounded by auth, size limits, and fixed endpoints, but misconfiguration or key handling still matters.
Overview
Adds an opt-in voice dictation beta: record in the chat composer, transcribe via the connected T3 server, and append text to the draft.
Client: New client settings (
voiceTranscriptionEnabled, provider OpenAI/Groq, optional local API key, model). Beta settings loads models from the provider and shows whetherOPENAI_API_KEY/GROQ_API_KEYexist on the server (booleans only).useVoiceTranscriptionusesMediaRecorder(5‑minute cap, waveform UI);ChatComposeradds mic/stop andVoiceTranscriptionPanel. macOS desktop builds addNSMicrophoneUsageDescription.Server: Authenticated routes
GET/POST /api/transcriptionandGET /api/transcription/modelsproxy to fixed OpenAI/Groq endpoints with a 25 MB limit, client key or env fallback, and structured errors. CORS allows thex-t3-transcription-*headers.Reviewed by Cursor Bugbot for commit 14315f5. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add voice dictation beta to the chat composer
ChatComposerthat lets users record audio and append the transcription to the prompt; recording is capped at 5 minutes and 25 MB.GET/POST /api/transcriptionandGET /api/transcription/modelsthat proxy audio to OpenAI or Groq and return transcribed text or available models.useVoiceTranscriptionhook managingMediaRecorderlifecycle,AudioContextlevel sampling, elapsed time, and error reporting with full cleanup on unmount.NSMicrophoneUsageDescriptioninInfo.plistfor the microphone permission prompt.Macroscope summarized 14315f5.